iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::memorydetail::fastcache_alloc< cache_size > Struct Template Reference

#include <nrt/Core/Memory/details/AllocationHelpers.H>

template<size_t cache_size>
struct nrt::memorydetail::fastcache_alloc< cache_size >

Caching allocator with free lists for common allocation sizes.

Definition at line 89 of file AllocationHelpers.H.

Public Member Functions

 fastcache_alloc (fastcache_alloc const &other)=delete
void set_debug (bool)
void set_allow_caching (bool on)
void show_stats (int verbosity, const char *pfx, const size_t block_size, const size_t overhead) const
void * allocate (size_t nbytes, nrt::rutz::free_list_base **source)
void deallocate (void *space, nrt::rutz::free_list_base *source)
void release_free_mem ()

Public Attributes

nrt::rutz::free_list_base * cache [cache_size]
size_t num_alloc [cache_size]
bool allow_caching

The documentation for this struct was generated from the following file: