java-memory

λ©”μ„œλ“œ μ˜μ—­

  • method area

  • ν”„λ‘œκ·Έλž¨μ„ μ‹€ν–‰ν•˜λŠ”λ° ν•„μš”ν•œ 곡톡 데이터 관리

  • 클래슀 정보

    • bytecode, field, method, consturctor

  • static μ˜μ—­

    • static λ³€μˆ˜λ“€

  • λŸ°νƒ€μž„ μƒμˆ˜ ν’€

    • 곡톡 literal μƒμˆ˜ 보관

μŠ€νƒ μ˜μ—­

  • stack area

  • μžλ°” μ‹€ν–‰ μ‹œ, ν•˜λ‚˜μ˜ μ‹€ν–‰ μŠ€νƒμ΄ 생성

  • 각 μŠ€νƒ ν”„λ ˆμž„μ€ μ§€μ—­λ³€μˆ˜, 쀑간 μ—°μ‚° κ²°κ³Ό, λ©”μ„œλ“œ 호좜 정보등을 포함

  • μŠ€νƒ ν”„λ ˆμž„?

    • λ©”μ„œλ“œ 호좜 ν• λ•Œ λ§ˆλ‹€ ν•˜λ‚˜μ˜ μŠ€νƒ ν”„λ ˆμž„μ΄ μŒ“μ΄λŠ” 것

    • λ©”μ„œλ“œκ°€ μ’…λ£Œλ˜λ©΄ ν•΄λ‹Ή μŠ€νƒ ν”„λ ˆμž„μ΄ μ œκ±°λœλ‹€.

  • μŠ€νƒ μ˜μ—­μ€ 각 μŠ€λ ˆλ“œλ³„λ‘œ ν•˜λ‚˜μ˜ μ‹€ν–‰ μŠ€νƒμ΄ 생성됨.

    • 즉 μŠ€λ ˆλ“œ 수만큼 μŠ€νƒμ΄ 생성됨

νž™ μ˜μ—­

  • heap area

  • 객체(μΈμŠ€ν„΄μŠ€) 와 λ°°μ—΄μ‹œ μƒμ„±λ˜λŠ” μ˜μ—­

  • GC κ°€ μ΄λ£¨μ–΄μ§€λŠ” μ£Όμš”μ˜μ—­

μ°Έκ³ 

  • https://www.inflearn.com/course/lecture?courseSlug=%EA%B9%80%EC%98%81%ED%95%9C%EC%9D%98-%EC%8B%A4%EC%A0%84-%EC%9E%90%EB%B0%94-%EA%B3%A0%EA%B8%89-1&unitId=232319&tab=curriculum&subtitleLanguage=ko

Last updated