Learning About Memory Allocation

  • Basic Posix Allocation API:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
void *malloc( size_t size);
void *calloc( size_t number,
size_t size);
int posix_memalign( void **ptr,
size_t alignment,
size_t size);
void *aligned_alloc( size_t alignment,
size_t size);
void *realloc( void *ptr,
size_t size);
void free( void *ptr);