SyTen
le_malloc.h File Reference

Aligned, pooled memory allocation function and allocator. More...

#include <cstddef>
#include "inc/util/le_malloc_mtx.h"
+ Include dependency graph for le_malloc.h:
+ This graph shows which files directly or indirectly include this file:

Classes

struct  syten::EternalAllocator< Type >
 STL-compatible allocator using le_malloc() More...
 
struct  syten::EternalMalloc::RegionsInitialiser
 https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Nifty_Counter has a detailed explanation. More...
 

Namespaces

namespace  syten
 Syten namespace.
 
namespace  syten::EternalMalloc
 Implementation namespace for le_malloc() and le_free()
 

Functions

void syten::le_free (void *ptr)
 Frees the space of memory pointed to by ptr. More...
 
void * syten::le_malloc (std::size_t const size, std::size_t const alignment=64)
 Allocates a region of heap memory at least size bytes large, aligned to alignment boundary in a special pool designed for eternal small objects (e.g. reps). More...
 
template<typename TypeA , typename TypeB >
bool syten::operator!= (EternalAllocator< TypeA > const &, EternalAllocator< TypeB > const &)
 All eternal allocators use the same pool, so they are all equal. More...
 
template<typename TypeA , typename TypeB >
bool syten::operator== (EternalAllocator< TypeA > const &, EternalAllocator< TypeB > const &)
 All eternal allocators use the same pool, so they are all equal. More...
 

Variables

static struct syten::EternalMalloc::RegionsInitialiser syten::EternalMalloc::regionsInitialiser
 See EternalMalloc::RegionsInitialiser. More...
 

Detailed Description

Aligned, pooled memory allocation function and allocator.