7 #ifndef __core_StdAllocator_h__ 8 #define __core_StdAllocator_h__ 21 typedef FE_UWORD size_type;
22 typedef ptrdiff_t difference_type;
24 typedef const T* const_pointer;
26 typedef const T& const_reference;
32 pointer allocate(size_type n,
const void * = 0)
34 T* t = (T*) fe::allocate(n *
sizeof(T));
35 feLog(
"StdAllocator::allocate %p\n",t);
39 void deallocate(
void* p, size_type)
48 pointer address(reference x)
const 51 const_pointer address(const_reference x)
const 57 void construct(pointer p,
const T& val)
58 {
new ((T*) p) T(val); }
60 void destroy(pointer p)
63 size_type max_size()
const 64 {
return FE_UWORD(-1); }
kernel
Definition: namespace.dox:3
Replacement for std::allocator using the FE memory system.
Definition: StdAllocator.h:18