Windows Memory and Stack Flashcards
PEB
Process Environment Block
TEB
Thread Environment Block
Program Image
The Program Image portion of memory is where the executable resides.
.text section
containing the executable code/CPU instructions
.data section
containing the program’s global data
.rsrc section
contains non-executable resources, including icons, images, and strings
heap
dynamically allocated (e.g. malloc( )) portion of memory a program uses to store global variables. Unlike the stack, heap memory allocation must be managed by the application. In other words, that memory will remain allocated until it is freed by the program or the program itself terminates.
stack
the stack is used to allocate short-term storage for local (function/method) variables in an ordered manner and that memory is subsequently freed at the termination of the given function. Recall how a given process can have multiple threads. Each thread/function is allocated its own stack frame. The size of that stack frame is fixed after creation and the stack frame is deleted at the conclusion of the function.
Stack structure
Last in First out
Name three memory models
flat, segmented, real-address
bss
un-initialized data