#include <ft_allocator.h>
Public Methods | |
void * | allocate (size_t s) |
void | clear () |
size_t | size () const |
FTAllocator (size_t bs) | |
Private Attributes | |
const size_t | BSize |
block * | blist |
size_t | free_pos |
size_t | bcount |
This manager allocates and keeps track of blocks of memory. Individual segments of these blocks are then made available to users. The manager does not keep track of each individual segment. Rather it allows the user to deallocate all the memory at once. This memory manager is ideal for "dictionary" type data structures that allow only growing structure.
|
allocates a memory segment of the given size * |
|
deallocates all the memory blocks used by this allocator * |
|
returns the total number of bytes used by this allocator * |
|
number of blocks in use * |
|
pointer to the list of used blocks * |
|
block size * |
|
first available position within the current block * |