CS 136 - Week 4

Class 7 - January 27, 2025

In this course, there is 5 sections (or "regions") of memory (RAM):
low
Code
Read-Only Data
Global Data
Heap
Stack
high

Functions and the compiled version of our code lives in code. Sometimes you want read only data/memory (ROM) and that's where it lives. Global Data lives in global variables that are mutable. Heap and stack don't have a set size, and there isn't a boundary between the two - they can dynamically adjust their size. It's BAD if they overlap with each other! Global constants are kept in read-only memory.

Function Calls

Memory