- What is a program break
- How to play with a program break in order to allocate memory dynamically
- How the glibc
malloc
andfree
functions work - What is ASLR
- What is memory alignment
- What is a memory page
- How to encapsulate the memory management in order to hide it from the user
sbrk
brk
malloc
0. Naive malloc Build the naive malloc that is presented in the concept page.
- Prototype:
void *naive_malloc(size_t size);
1. malloc
Write you own malloc
function that allocates space in the heap
- Prototype:
void *_malloc(size_t size);
2. free
Write you own free
function that frees a memory space
- Prototype:
void _free(void *ptr);