Defined in file: hzSMAR.h
Segmented Memory Allocation Regime
Constructors/Detructors
| hzSMAR* | hzSMAR | (void) | |
| hzSMAR* | hzSMAR | (uint32_t nCode) | |
| NULL-TYPE | hzSMAR | (uint32_t nCode) | |
| void | ~hzSMAR | (void) |
Public Methods:
| uint32_t | Alloc | (uint32_t nSize) | Allocate string space. The actual space allocated will be sufficient for a string of length nSize, plus the copy count, length indicator and NULL terminator. |
| hzEcode | Free | (uint32_t ssrAddr)uint32_t nSize, | Places object in freelist if it is of one of the precribed sizes, otherwise it frees it from the OS managed heap Returns: None |
| void | Report | (hzChain& report) | |
| unsigned char* | Xlate | (uint32_t ssrAddr) | Translate a 32-bit unsigned string address, to a pointer to an (encoded) string |
Member Variables:
| hzMapS<uint32_t,void*> | m_Heap | Heap allocated oversized strings | |
| hzMapS<uint32_t,_smarBloc*> | m_Super | Map of 256K superblocks (max of 64K addressable so 16Gb space) | |
| uint32_t* | m_arrFL | Array of free lists for each size | |
| hzLockS | m_lockFlist | Lock for m_Flists | |
| hzLockS | m_lockOsize | Lock for allocating/freeing of oversize strings | |
| hzLockS | m_lockSbloc | Lock for allocating superblocks | |
| uint64_t | m_nAllocNew | Total number of new allocations | |
| uint64_t | m_nAllocOld | Total number of allocations from free list | |
| uint32_t | m_nCode | Diagnostics | |
| uint32_t | m_nLive | Live string population | |
| uint64_t | m_nReleases | Total number of releases | |
| _smarBloc* | m_pTopBlock | Latest small string space superblock (only one from which new string spaces can be allocated) |