Memory & Pointers 1

CMPT-225, Fall 2021

Computer Memory

Diagram displaying “Code + Data for running part of OS” at the start of memory, “Free memory” in the middle, and “Code + Data for running user processes” and the end.

Variables & Memory

A variable is (roughly) and names & tagged collection of bytes:

Diagram showing:

Addresses & Pointers - By Example

Diagram of memory:

Address Name Value
254 i 5
923 p 254

Second diagram of memory:

Address Name Value Size
0x6fffbe i 5 4 bytes
??? p 0x6fffbe 4 bytesa

Slide showing program code: see pointers.c

Slide showing output: see output.txt

Slide showing same program with different highlights.

Slide showing same output with different highlights.

End