Pool allocator for use only from the GUI thread to minimize memory fragmentation. More...
Public Member Functions
|void *||Allocate (size_t size)|
|void||Release (void *block)|
Non-core library: UTgui
GUI objects pool allocator implementation to minimize memory fragmentation. This class can only be used from the main (GUI) thread. A single global instance is provided as g_gui_pool_allocator. This should only be used for reasonably short-lived and frequently allocated objects, otherwise as pools are freed in an attempt to keep that memory fragmentation to a minimum, the old blocks will stay allocated and actually make matters worse. If a pool block has been leaked, build the UT libraries with TRACE_LEAKED_POOL_BLOCK to diagnose where the block was allocated. That facility is only available in debug builds.
|void * GUIPoolAllocator_t::Allocate||(||size_t||size||)||
|void GUIPoolAllocator_t::Release||(||void *||block||)||