25 #ifndef _JIT_COMPILER2_ALLOC_ALLOCATOR
26 #define _JIT_COMPILER2_ALLOC_ALLOCATOR
42 template<class T, class BaseAllocator = std::allocator<T> >
45 typedef typename BaseAllocator::pointer
pointer;
46 typedef typename BaseAllocator::size_type
size_type;
63 pointer r = BaseAllocator::allocate(n);
66 STATISTICS(comp2_max.max(current_heap_size()));
71 pointer r = BaseAllocator::allocate(n, h);
74 STATISTICS(comp2_max.max(current_heap_size()));
79 BaseAllocator::deallocate(p, n);
#define STATISTICS(x)
Wrapper for statistics only code.
void deallocate(pointer p, size_type n)
BaseAllocator::size_type size_type
BaseAllocator::pointer pointer
Allocator(const Allocator< U, typename BaseAllocator::template rebind< U >::other > &other)
Allocator(const Allocator &other)
This file contains the statistics framework.
pointer allocate(size_type n)
Allocator< U, typename BaseAllocator::template rebind< U >::other > other
pointer allocate(size_type n, pointer h)
#define STAT_DECLARE_VAR(type, var, init)
Declare an external statistics variable.
std::size_t & current_heap_size()