- Developer's written code goes into
Instructionlayer - Large constants for example string does into
Literallayer - Static variable, including global variable goes into
Static Data - Variable allocated with
newormllocgoes intoDynamic Data (Heap) - Local variable or procedure context goes into
Stacklayer Following allocation to each data type - Array
- It depends on the type of allocation
- If fixed size array i.e. at compile time then goes to stack layer
- If variable size array at run time then it goes to
Heap
