1 H E A P S E G M E N T
L I V E E X A M P L E
Contains all created objects in runtime, objects only
plus their object attributes (instance variables)
= Young (new objects that die more often than old
ones)
- Eden
- Survivor 1
- Survivor 2
= Old (objects that outlived several Garbage
Collectors cycles)
2 S T A C K S E G M E N T ( O F F - H E A P )  
Contains local variables and Reference variables
(variables that hold the address of an object in the
heap
= Stack  (-Xss, max memory, it is around 2000
threads for average enterprise app. , 2000 x 1mb =
2GB )
= Metaspace (-XX:MetaspaceSize=256m)
= Code Cache(-XX:InitialCodeCacheSize 100 mb)
3 C O D E S E G M E N T ( O F F - H E A P )
The segment where the actual compiled Java
bytecodes resides when loaded
JAVA MEMORY
MODEL
CHEAT SHEET
T Y P E S I Z E S
MynameisMarkand
I'mJavaSenior
Consultantwith+10
yearsofexperience

More Related Content

PPTX
Final keyword in java
PPTX
java interface and packages
PPT
Contiguous Memory Allocation.ppt
PDF
Multithreading
PDF
Xml parsing
PDF
Lambda Expressions in Java
PDF
Shell scripting
PPTX
System call (Fork +Exec)
Final keyword in java
java interface and packages
Contiguous Memory Allocation.ppt
Multithreading
Xml parsing
Lambda Expressions in Java
Shell scripting
System call (Fork +Exec)

What's hot (20)

PPSX
Sessions and cookies
PPT
Linux file system
ODP
Introduction to Shell script
PPSX
User Administration in Linux
PDF
Shell scripting
PPTX
User management
PDF
Etsy Activity Feeds Architecture
PPTX
File Management in Operating System
PPT
Cookies and sessions
PPT
Wrapper class (130240116056)
PPT
Working with color and font
PPTX
Shell scripting
PDF
Enumeration in Java Explained | Java Tutorial | Edureka
PPTX
Java packages
PPT
Exception handling in java
PDF
Course 102: Lecture 16: Process Management (Part 2)
PPTX
servlet in java
PDF
sed(1)
PPT
Java And Multithreading
Sessions and cookies
Linux file system
Introduction to Shell script
User Administration in Linux
Shell scripting
User management
Etsy Activity Feeds Architecture
File Management in Operating System
Cookies and sessions
Wrapper class (130240116056)
Working with color and font
Shell scripting
Enumeration in Java Explained | Java Tutorial | Edureka
Java packages
Exception handling in java
Course 102: Lecture 16: Process Management (Part 2)
servlet in java
sed(1)
Java And Multithreading
Ad

Similar to Java JVM Memory Cheat Sheet (20)

PPTX
Javasession10
PPT
Inside the JVM
PPTX
Java memory model
PPTX
Exploring Java Heap Dumps (Oracle Code One 2018)
PDF
Software Profiling: Java Performance, Profiling and Flamegraphs
PPTX
Java performance tuning
PDF
A quick view about Java Virtual Machine
ODP
Quick introduction to Java Garbage Collector (JVM GC)
PDF
Inside The Java Virtual Machine
PDF
Java Memory Analysis: Problems and Solutions
PDF
Software Profiling: Understanding Java Performance and how to profile in Java
PDF
Java 25 and Beyond - A Roadmap of Innovations
PDF
Inside the JVM - Follow the white rabbit!
PPT
Java Performance Monitoring & Tuning
PPT
Java programing considering performance
PDF
Java Garbage Collector and The Memory Model
PDF
Java memory presentation IBM 7
PDF
A healthy diet for your Java application Devoxx France.pdf
PDF
Java Performance and Profiling
PDF
New Java features: Simplified Design Patterns[LIT3826]
Javasession10
Inside the JVM
Java memory model
Exploring Java Heap Dumps (Oracle Code One 2018)
Software Profiling: Java Performance, Profiling and Flamegraphs
Java performance tuning
A quick view about Java Virtual Machine
Quick introduction to Java Garbage Collector (JVM GC)
Inside The Java Virtual Machine
Java Memory Analysis: Problems and Solutions
Software Profiling: Understanding Java Performance and how to profile in Java
Java 25 and Beyond - A Roadmap of Innovations
Inside the JVM - Follow the white rabbit!
Java Performance Monitoring & Tuning
Java programing considering performance
Java Garbage Collector and The Memory Model
Java memory presentation IBM 7
A healthy diet for your Java application Devoxx France.pdf
Java Performance and Profiling
New Java features: Simplified Design Patterns[LIT3826]
Ad

More from Mark Papis (8)

PDF
Java Concurrency Starter Kit
PDF
9 crucial Java Design Principles you cannot miss
PDF
Java Streams Interview short reminder with examples
PDF
Java vs Web security Cheat Sheet
PDF
Java technical stack Cheat Sheet
PDF
Spring cheat sheet
PDF
Java inheritance cheat sheet
PDF
Java Collections comparison Cheat Sheet
Java Concurrency Starter Kit
9 crucial Java Design Principles you cannot miss
Java Streams Interview short reminder with examples
Java vs Web security Cheat Sheet
Java technical stack Cheat Sheet
Spring cheat sheet
Java inheritance cheat sheet
Java Collections comparison Cheat Sheet

Recently uploaded (20)

PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PPTX
Module 1 Introduction to Web Programming .pptx
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
substrate PowerPoint Presentation basic one
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
giants, standing on the shoulders of - by Daniel Stenberg
LMS bot: enhanced learning management systems for improved student learning e...
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
CEH Module 2 Footprinting CEH V13, concepts
A symptom-driven medical diagnosis support model based on machine learning te...
Electrocardiogram sequences data analytics and classification using unsupervi...
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Module 1 Introduction to Web Programming .pptx
Basics of Cloud Computing - Cloud Ecosystem
SGT Report The Beast Plan and Cyberphysical Systems of Control
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
MuleSoft-Compete-Deck for midddleware integrations
NewMind AI Weekly Chronicles – August ’25 Week IV
substrate PowerPoint Presentation basic one
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
giants, standing on the shoulders of - by Daniel Stenberg

Java JVM Memory Cheat Sheet

  • 1. 1 H E A P S E G M E N T L I V E E X A M P L E Contains all created objects in runtime, objects only plus their object attributes (instance variables) = Young (new objects that die more often than old ones) - Eden - Survivor 1 - Survivor 2 = Old (objects that outlived several Garbage Collectors cycles) 2 S T A C K S E G M E N T ( O F F - H E A P )   Contains local variables and Reference variables (variables that hold the address of an object in the heap = Stack  (-Xss, max memory, it is around 2000 threads for average enterprise app. , 2000 x 1mb = 2GB ) = Metaspace (-XX:MetaspaceSize=256m) = Code Cache(-XX:InitialCodeCacheSize 100 mb) 3 C O D E S E G M E N T ( O F F - H E A P ) The segment where the actual compiled Java bytecodes resides when loaded JAVA MEMORY MODEL CHEAT SHEET T Y P E S I Z E S MynameisMarkand I'mJavaSenior Consultantwith+10 yearsofexperience