MCPcopy Create free account
hub / github.com/acl-dev/acl / squid_allocator_create

Function squid_allocator_create

lib_acl/src/stdlib/memory/squid_allocator.c:355–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355ACL_ALLOCATOR *squid_allocator_create(void)
356{
357 ACL_ALLOCATOR *allocator;
358
359 allocator = allocator_alloc(sizeof(SQUID_MEM_ALLOCATOR));
360
361 allocator->pool_create_fn = memPoolCreate;
362 allocator->pool_config_fn = memConfigure;
363 allocator->pool_destroy_fn = memPoolDestroy;
364 allocator->pool_clean_fn = memCleanModule;
365
366 allocator->pool_if_used = memPoolWasUsed;
367 allocator->pool_inuse_count = memPoolInUseCount;
368 allocator->pool_inuse_size = memPoolInUseSize;
369 allocator->pool_total_allocated = memTotalAllocated;
370
371 allocator->mem_alloc_fn = memPoolAlloc;
372 allocator->mem_free_fn = memPoolFree;
373
374 memset(&((SQUID_MEM_ALLOCATOR *) allocator)->TheMeter,
375 0, sizeof(MemPoolMeter));
376
377 return (ACL_ALLOCATOR *) allocator;
378}

Callers 1

acl_allocator_createFunction · 0.85

Calls 1

allocator_allocFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…