Memory Allocation: Difference between revisions

m
adding link
[unchecked revision][unchecked revision]
No edit summary
m (adding link)
Line 5:
At square one, the kernel is the only process in the system. But it is not alone: [[BIOS]] data structures, memory-mapped hardware registers etc. populate the address space. Among the first things a kernel must do is to start bookkeeping about which areas of physical memory are available for use and which are to be considered "occupied".
 
The free space will subsequently be used for kernel data structures, application binaries, their heap and [[stack]] etc. - the kernel needs a function that marks a memory area as reserved, and makes that memory available to the process requiring it. In the C Standard Library, this is handled by malloc() and free(); in C++ by new() and delete().
 
==A very very simple Memory Manager==
Anonymous user