| 51 | |
| 52 | template <class CAlloc, typename... Args> |
| 53 | typename CAlloc::Value_type * |
| 54 | thread_alloc(CAlloc &a, ProxyAllocator &l, Args &&...args) |
| 55 | { |
| 56 | if (!cmd_disable_pfreelist && l.freelist) { |
| 57 | void *v = l.freelist; |
| 58 | l.freelist = *reinterpret_cast<void **>(l.freelist); |
| 59 | --(l.allocated); |
| 60 | #if TS_USE_ALLOCATOR_METRICS |
| 61 | a.increment_for_alloc(); |
| 62 | #endif |
| 63 | ::new (v) typename CAlloc::Value_type(std::forward<Args>(args)...); |
| 64 | return static_cast<typename CAlloc::Value_type *>(v); |
| 65 | } |
| 66 | return a.alloc(std::forward<Args>(args)...); |
| 67 | } |
| 68 | |
| 69 | void *thread_alloc(Allocator &a, ProxyAllocator &l); |
| 70 |
nothing calls this directly
no test coverage detected