void malloc_init (void) { #ifdef USE_MEMMGR memmgr_init (); #endif return; }
void malloc_init (void) { #if defined(DMALLOC) && defined(CYGWIN) // http://dmalloc.com/docs/latest/online/dmalloc_19.html dmalloc_debug_setup(getenv("DMALLOC_OPTIONS")); #endif #ifdef GCOLLECT // don't garbage collect, only report inaccessible memory that was not deallocated GC_find_leak = 1; GC_INIT(); #endif #ifdef USE_MEMMGR memmgr_init (); #endif }
static void ldwrapper_init() { if (__sync_bool_compare_and_swap(&ma_initialized, FALSE, TRUE)) { DEBUG("initialize subsystem\n"); /* sem_init(&ma_sem, 0, 1); */ atexit(&ldwrapper_exit); mm = memmgr_init(); } while (__sync_and_and_fetch(&ma_initialized, TRUE) == FALSE) { DEBUG("waiting for initialization\n"); } }
void * MemMgrAllocatorInit(size_t prealloc_size, size_t worker_size, size_t num_workers, unsigned char alignment) { assert(alignment <= sizeof(mem_header_union::Align)); memmgr_init(prealloc_size, worker_size, num_workers, 256); return memmgr_alloc(1); }
void wbMemoryManager_new(size_t heapsize) { memmgr_init(heapsize); return; }