Provides a heap in which to put strings or whatever you need to store. If you need to allocate space for a lot of small objects, it's much more efficient to use this class than the C++ heap. Plus, you can delete them all by simply deleting the heap. You can't, however, reuse the space for individual objects in this heap.
|
| | GHeap (size_t nMinBlockSize) |
| |
| | GHeap (const GHeap &that) |
| |
| virtual | ~GHeap () |
| |
| char * | add (const char *szString) |
| | Allocate space in the heap and copy a string to it. Returns a pointer to the string. More...
|
| |
| char * | add (const char *pString, size_t nLength) |
| | Allocate space in the heap and copy a string to it. Returns a pointer to the string. More...
|
| |
| char * | allocAligned (size_t nLength) |
| | Allocate space in the heap and return a pointer to it. The returned pointer will be aligned to start at a location divisible by the size of a pointer, so it will be suitable for use with placement new even on architectures that require aligned pointers. More...
|
| |
| char * | allocate (size_t nLength) |
| | Allocate space in the heap and return a pointer to it. More...
|
| |
| void | clear () |
| | Deletes all the blocks and frees up memory. More...
|
| |