// constructor UMF_ALLOCATOR_CLASS::UMF_ALLOCATOR_CLASS() { SetTraceableName("umf_allocator"); // Preallocate some entries for the pool, hoping they will be contiguous for (int i = 0; i < UMF_POOL_SIZE; i++) { // Zero out message to make valgrind happy UMF_MESSAGE m = (UMF_MESSAGE) memset(malloc(sizeof(UMF_MESSAGE_CLASS)), 0, sizeof(UMF_MESSAGE_CLASS)); m->setAllocator(this); m->SetFreeListNext(NULL); memset(m, 0, sizeof(UMF_MESSAGE_CLASS)); freeList.Push(m); } }