Classes | Public Types | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | Friends | List of all members
vnl_alloc Class Reference

#include <vnl_alloc.h>

Classes

class  lock
 
union  obj
 

Public Types

typedef char value_type
 

Static Public Member Functions

static void * allocate (std::size_t n)
 
static void deallocate (void *p, std::size_t n)
 
static void * reallocate (void *p, std::size_t old_sz, std::size_t new_sz)
 

Static Private Member Functions

static std::size_t ROUND_UP (std::size_t bytes)
 
static std::size_t FREELIST_INDEX (std::size_t bytes)
 
static void * refill (std::size_t n)
 
static char * chunk_alloc (std::size_t size, int &nobjs)
 

Static Private Attributes

static objfree_list [VNL_ALLOC_NFREELISTS] = { nullptr }
 
static char * start_free = nullptr
 
static char * end_free = nullptr
 
static std::size_t heap_size = 0
 

Friends

union obj
 
class lock
 

Detailed Description

Definition at line 44 of file vnl_alloc.h.

Member Typedef Documentation

◆ value_type

typedef char vnl_alloc::value_type

Definition at line 86 of file vnl_alloc.h.

Member Function Documentation

◆ allocate()

static void* vnl_alloc::allocate ( std::size_t  n)
inlinestatic

Definition at line 89 of file vnl_alloc.h.

◆ chunk_alloc()

char * vnl_alloc::chunk_alloc ( std::size_t  size,
int &  nobjs 
)
staticprivate

Definition at line 9 of file vnl_alloc.cxx.

◆ deallocate()

static void vnl_alloc::deallocate ( void *  p,
std::size_t  n 
)
inlinestatic

Definition at line 110 of file vnl_alloc.h.

◆ FREELIST_INDEX()

static std::size_t vnl_alloc::FREELIST_INDEX ( std::size_t  bytes)
inlinestaticprivate

Definition at line 61 of file vnl_alloc.h.

◆ reallocate()

void * vnl_alloc::reallocate ( void *  p,
std::size_t  old_sz,
std::size_t  new_sz 
)
static

Definition at line 102 of file vnl_alloc.cxx.

◆ refill()

void * vnl_alloc::refill ( std::size_t  n)
staticprivate

Definition at line 72 of file vnl_alloc.cxx.

◆ ROUND_UP()

static std::size_t vnl_alloc::ROUND_UP ( std::size_t  bytes)
inlinestaticprivate

Definition at line 46 of file vnl_alloc.h.

Friends And Related Function Documentation

◆ lock

friend class lock
friend

Definition at line 82 of file vnl_alloc.h.

◆ obj

friend union obj
friend

Definition at line 49 of file vnl_alloc.h.

Member Data Documentation

◆ end_free

char * vnl_alloc::end_free = nullptr
staticprivate

Definition at line 73 of file vnl_alloc.h.

◆ free_list

vnl_alloc::obj * vnl_alloc::free_list = { nullptr }
staticprivate

Definition at line 59 of file vnl_alloc.h.

◆ heap_size

std::size_t vnl_alloc::heap_size = 0
staticprivate

Definition at line 74 of file vnl_alloc.h.

◆ start_free

char * vnl_alloc::start_free = nullptr
staticprivate

Definition at line 72 of file vnl_alloc.h.


The documentation for this class was generated from the following files: