Skip to content
Ameen Abozaid
Planned lessonMID-001-L04

Runtime data areas

  • Lesson 4 of 6
  • Mid-level
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

name where each kind of data lives at runtime.

Planned topics

  • Heap: all objects and arrays, shared by threads, managed by the GC.
  • Thread stacks: one per thread, holding frames with locals and call state.
  • Metaspace: class metadata, in native memory (it replaced PermGen).
  • Code cache: JIT-compiled machine code.
  • There is also other native memory: direct buffers, thread stacks, GC structures. Heap size is not total process size.
Draft outline details

Demonstration

a diagram: heap and metaspace shared; N stacks; code cache; native memory around it.

Check your understanding

Where does new Order() live?

Show answer

On the heap; the reference variable is in a stack frame.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.