9#ifndef SQUID_SRC_MEM_POOLINGALLOCATOR_H
10#define SQUID_SRC_MEM_POOLINGALLOCATOR_H
12#include "mem/forward.h"
28 template <
class OtherValue>
33 template<
class U,
class ... Args>
void construct(U *p, Args && ... args) {
new((
void *)p) U(std::forward<Args>(args)...); }
34 template<
typename OtherValue>
void destroy(OtherValue *p) { p->~OtherValue(); }
37template <
class L,
class R>
44template <
class L,
class R>
bool operator!=(const PoolingAllocator< L > &l, const PoolingAllocator< R > &r) noexcept
bool operator==(const PoolingAllocator< L > &, const PoolingAllocator< R > &) noexcept
STL Allocator that uses Squid memory pools for memory management.
void destroy(OtherValue *p)
void construct(U *p, Args &&... args)
void deallocate(value_type *vp, std::size_t n) noexcept
PoolingAllocator(const PoolingAllocator< Other > &) noexcept
PoolingAllocator() noexcept
value_type * allocate(std::size_t n)
void memFreeBuf(size_t size, void *)
void * memAllocBuf(size_t net_size, size_t *gross_size)
PoolingAllocator< OtherValue > other