Skip to main content

Heap โ†” unstructured memory pool to store all Objects for app

the Heap stores all reference types (objects)

Heap is main shared memory of JS Engine Object

Heap Spaceโ€‹

V8 organize Heap into Page regions to work with Garbage Collector

Referencesโ€‹

  1. Reference Reassignment โ†” New Identifier created ๐Ÿ‘‰ same value to ref Heap Memory Address (where actual Object store in Heap)

  2. Object Reference โ†” Link to Object as Memory Address pointer to Heap location

  3. JS Engine โ†” Program to execute JS Source Code, consists of Call Stack, Heap, Callback Queue & Event Loop

  4. Garbage-Collection โ†” ๐ŸงนAlgorithm (in JS Engine) to remove old unused Object from Heap Memory

  5. Memory Leak โ†” old Values clogging up Heap; left behind, not removed

  6. Heap Space โ†” V8 organize Heap into Page regions to work with Garbage Collector