This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | chunkallocator |
| Chunkallocator structure. More... | |
| struct | chunkblock |
| Chunkblock. More... | |
Defines | |
| #define | CHUNKBLOCK_MINSIZE 32 |
| Minimum of Chunkblock. | |
Functions | |
| chunkallocator * | chunkallocator_new (size_t binsize) |
| Create a new chunkallocator. | |
| void | chunkallocator_destroy (chunkallocator *a) |
| Destroy chunkallocator. | |
| void * | chunkallocator_alloc (chunkallocator *a) |
| Allocate chunk. | |
| void | gnn_chunkallocator_free (chunkallocator *a, void *memblock) |
|
|
This function returns a pointer to a new allocated memory chunk. The chunkallocator handles the memory management to do so, and of course, to allocate a chunk of the correct size efficiently. Internally, the allocator checks if there are dead chunks, that is, previously deallocated chunks that lie fragmented in the memory. If so it assigns its memory. If not, then it returns new memory from the memory pool. If there isn't any memory available either, then it creates a new chunkblock.
Definition at line 236 of file chunkallocator.c. |
|
|
This function frees the memory of the chunkallocator, freeing the structure and all its chunk/memory blocks.
Definition at line 205 of file chunkallocator.c. |
|
|
This function creates a new chunkallocator for bins of the given size.
Definition at line 146 of file chunkallocator.c. |
|
||||||||||||
|
|
1.2.18