Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AllocAux.H File Reference


Detailed Description

memory allocation routines for 16-byte alignment

Definition in file AllocAux.H.

#include <cstdlib>

Include dependency graph for AllocAux.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * invt_allocate_aux (size_t nbytes)
 Allocate nbytes of memory, throwing an exception in case of failure.
void invt_deallocate_aux (void *mem)
 Deallocate the given memory region.
void invt_allocation_release_free_mem ()
 Released any cached free memory blocks (e.g. to conserve memory).
void invt_allocation_allow_caching (bool on)
 Turn on/off caching of memory blocks of commonly-used sizes.
void invt_allocation_debug_print (bool print)
 Turn on/off memory-allocation debugging statements.
void invt_allocation_show_stats (int verbosity=0, const char *pfx=0, const size_t units=0)
 Print current stats for whatever memory allocator is in use.
void invt_allocation_set_stats_units (const size_t units)
 Set the units to be used by default in invt_allocation_show_stats().


Function Documentation

void* invt_allocate_aux size_t  nbytes  ) 
 

Allocate nbytes of memory, throwing an exception in case of failure.

Definition at line 515 of file AllocAux.C.

References g_alloc, g_alloc_mutex, and GVX_MUTEX_LOCK.

Referenced by invt_allocate().

void invt_allocation_allow_caching bool  on  ) 
 

Turn on/off caching of memory blocks of commonly-used sizes.

Definition at line 533 of file AllocAux.C.

References g_alloc, g_alloc_mutex, and GVX_MUTEX_LOCK.

Referenced by ModelManager::paramChanged().

void invt_allocation_debug_print bool  print  ) 
 

Turn on/off memory-allocation debugging statements.

If on, each invt_allocate() and invt_deallocate() call will print some stats about the memory block being currently allocated/deallocated, as well as some general stats about the total amount of memory allocated and the amount of memory currently in use

Definition at line 539 of file AllocAux.C.

References g_alloc, g_alloc_mutex, and GVX_MUTEX_LOCK.

void invt_allocation_release_free_mem  ) 
 

Released any cached free memory blocks (e.g. to conserve memory).

Definition at line 527 of file AllocAux.C.

References g_alloc, g_alloc_mutex, and GVX_MUTEX_LOCK.

Referenced by TrainingSet::load(), and TrainingSet::loadRebalanced().

void invt_allocation_set_stats_units const size_t  units  ) 
 

Set the units to be used by default in invt_allocation_show_stats().

Definition at line 553 of file AllocAux.C.

References g_stats_units.

Referenced by InputFrameSeries::Impl::readFrame().

void invt_allocation_show_stats int  verbosity = 0,
const char *  pfx = 0,
const size_t  units = 0
 

Print current stats for whatever memory allocator is in use.

Parameters:
verbosity If greater than 0, will request additional stats to be displayed
pfx If non-null, will be printed at the beginning of each stats line.
units If non-zero, allocated memory blocks will be listed as multiples of this number of bytes; otherwise memory blocks will be listed as multiples of the units specified in the most recent call to invt_allocation_set_stats_units().

Definition at line 545 of file AllocAux.C.

References g_alloc, g_alloc_mutex, g_stats_units, and GVX_MUTEX_LOCK.

Referenced by submain().

void invt_deallocate_aux void *  mem  ) 
 

Deallocate the given memory region.

Definition at line 521 of file AllocAux.C.

References g_alloc, g_alloc_mutex, and GVX_MUTEX_LOCK.

Referenced by invt_deallocate().


Generated on Mon Nov 23 15:49:35 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4