| 100 | } |
| 101 | |
| 102 | ACL_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 | |
| 125 | ACL_ALLOCATOR *acl_allocator_create(size_t mem_limit) |
| 126 | { |
no test coverage detected
searching dependent graphs…