Data and Program Representation Flashcards
How is memory seen by the program?
As an array of bytes.
What is the address range of memory in bytes?
0 - (2^64 - 1). * this is for 64 bit architecture
Is all of the address space of memory used?
No
What are the sections in memory called?
memory mappings
What are the memory mappings, in order form lowest to highest in address range.
Text, RoData, Data, BSS, Heap - Shared libs - Stack
What does the text memory section hold?
Instructions that the program runs
What does the data memory section hold?
Initialized global variables.
What does the Bss memory section hold?
Uninitialized global variables. They are
initialized to zeroes.
What does the Heap memory section hold?
Memory returned when calling malloc/new. It grows upwards.
What does the Stack memory section hold?
It stores local variables and return
addresses. It grows downwards.
What does the RoData memory section hold?
Read Only Data. String constants
Which way does the Stack grow?
The stack grows downwards.
Which was does the heap grow?
The heap grows upwards
What are Dynamic Libraries?
They are libraries shared with other processes.
What does each dynamic library have its own of?
text, data, and bss.