memory model

This note last modified February 3, 2021

Segments

  • text
  • data
  • stack

text segment

contains the code of the program. The program counter points to something in this memory as the next address to go

data segment

contains global variables and the heap (global buffer)

stack

extra local variables

for current or pending functions

there’s also paging and swapping