Definition:
- Has Capacitor and accessed through Transistor
- Can loose the power of its capaity over time, therefore need to be refreshed periodically → dynamic
Loading step:
Memory Map:
- Stack:
- Stack
- Automatic storage for managing procedure called (e.g., local variables within a function)
- Store:
- Function calls (main, callees∂)
- Local variables (Pointer)
- grows downward
fp
points at the start (larger address hex)
sp
points to the top of stack (smaller address hex)
- Push by
ADDI sp, sp, -4
and SW x1, 0(sp)
- Pop by
LW x1, 0(sp)
and ADDI sp, sp, 4
- Heap:
- Heap
- Store dynamic data (create at runtime)
- ex: malloc in C, new in Java
- Global data:
- Global variables
- ex: static variables in C, constant arrays and string
- Variables defined outside of any function
- Gloabal pointer (GP) is used initialized to address allowing ±offsets into this segment
- Text:
- Store the content of programs (code and text, images,…)
- Where PC will be taking instructions from
- Reservered