class KZoneAllocator
|
Memory allocator for large groups of small objects. More... |
|
|
Public Methods
Protected Members
Memory allocator for large groups of small objects.
This should be used for large groups of objects that are created and
destroyed together. When used carefully for this purpose it is faster
and more memory efficient than malloc.
KZoneAllocator (long _blockSize = 128*1024)
| KZoneAllocator |
Create a ZoneAllocator
Parameters:
_blockSize | Size in bytes of the blocks requested from malloc.
|
~KZoneAllocator ()
| ~KZoneAllocator |
Destruct the ZoneAllocator and free all memory allocated by it.
void* allocate (size_t _size)
| allocate |
Allocate a memory block.
Parameters:
_size | Size in bytes of the memory block. Memory is not alligned!
|
[protected]
QList memoryBlocks
| memoryBlocks |
[protected]
char * currentBlock
| currentBlock |
[protected]
long blockOffset
| blockOffset |
[protected]
- Version: $Id: KZoneAllocator.html 132191 2002-01-17 21:32:13Z dfaure $
- Author: Waldo Bastian
- Generated: dfaure on kde.faure.org on Thu Jan 17 22:15:01 2002, using kdoc 2.0a53.