| 2358 | |
| 2359 | |
| 2360 | void* MemPool::allocate(size_t size ALLOC_PARAMS) |
| 2361 | { |
| 2362 | #ifdef VALIDATE_POOL |
| 2363 | MutexLockGuard guard(mutex, "MemPool::allocate"); |
| 2364 | Validator vld(this); |
| 2365 | #endif |
| 2366 | |
| 2367 | MemBlock* memory = allocateRange(0, size ALLOC_PASS_ARGS); |
| 2368 | |
| 2369 | increment_usage(memory->getSize()); |
| 2370 | |
| 2371 | return &memory->body; |
| 2372 | } |
| 2373 | |
| 2374 | |
| 2375 | void MemPool::releaseMemory(void* object, bool flagExtent) noexcept |