| 353 | } |
| 354 | |
| 355 | ACL_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 | } |
no test coverage detected
searching dependent graphs…