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

Function allocator_alloc

lib_acl/src/stdlib/memory/acl_allocator.c:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102ACL_ALLOCATOR *allocator_alloc(size_t size)
103{
104 ACL_ALLOCATOR *allocator;
105
106 allocator = (ACL_ALLOCATOR *) acl_default_calloc(__FILE__, __LINE__,
107 1, size);
108 allocator->pools = acl_stack_create(100);
109
110 allocator->pool_create_fn = pool_create;
111 allocator->pool_destroy_fn = pool_destroy;
112 allocator->pool_clean_fn = pool_clean;
113
114 allocator->pool_if_used = pool_ifused;
115 allocator->pool_inuse_count = pool_inuse_count;
116 allocator->pool_inuse_size = pool_inuse_size;
117 allocator->pool_total_allocated = pool_total_allocated;
118
119 allocator->mem_alloc_fn = mem_alloc;
120 allocator->mem_free_fn = mem_free;
121
122 return allocator;
123}
124
125ACL_ALLOCATOR *acl_allocator_create(size_t mem_limit)
126{

Callers 1

squid_allocator_createFunction · 0.85

Calls 2

acl_default_callocFunction · 0.85
acl_stack_createFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…