library of assembled shared sources |
http://lass.cocamware.com |
#include <allocator.h>
Public Member Functions | |
void * | allocate (size_t size) |
void | deallocate (void *mem, size_t size) |
void | deallocate (void *mem) |
void deallocate(void* mem)
to deallocate the memory.
void deallocate(void* mem)
does NOT mean it implements the FixedAllocator concept, not even partially. So when you use AllocatorSized as a base for an allocator that implements both the VariableAllocator as FixedAllocator concept depending on the base allocator (such as AllocatorStats), the result will be a VariableAllocator. You cannot generally assume you will be able to use void deallocate(void* mem)
on the resulting allocator as well. Particularly for AllocatorStats, it is know that this will cause undefined behaviour. However, using AllocatorStats as base AllocatorSized will achieve the desired effect perfectly well, and will cause no problem (= using AllocatorSized on top-level)Definition at line 1090 of file allocator.h.
void* lass::util::AllocatorSized< VariableAllocator >::allocate | ( | size_t | size | ) | [inline] |
Definition at line 1093 of file allocator.h.
void lass::util::AllocatorSized< VariableAllocator >::deallocate | ( | void * | mem, | |
size_t | size | |||
) | [inline] |
void lass::util::AllocatorSized< VariableAllocator >::deallocate | ( | void * | mem | ) | [inline] |
Definition at line 1105 of file allocator.h.
Generated on Mon Nov 10 14:22:16 2008 for Library of Assembled Shared Sources by 1.5.7.1 |