Zero  0.1.0
Classes | Macros
allocator.h File Reference
#include "w_defines.h"
#include <stdexcept>
#include "tls.h"
#include "block_alloc.h"

Go to the source code of this file.

Classes

class  sm_naive_allocator
 
class  sm_tls_allocator
 
class  memalign_allocator< T, Alignment >
 
struct  memalign_allocator< T, Alignment >::rebind< U >
 

Macros

#define DEFINE_SM_ALLOC(type)
 

Macro Definition Documentation

§ DEFINE_SM_ALLOC

#define DEFINE_SM_ALLOC (   type)
Value:
void* type::operator new(size_t s) \
{\
return smlevel_0::allocator.allocate<type>(s);\
}\
\
void type::operator delete(void* p, size_t s)\
{\
smlevel_0::allocator.release<type>((type*) p, s);\
}\