#include <cstdlib>
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(). |
memory allocation routines for 16-byte alignment
Definition in file AllocAux.H.
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.
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.
Referenced by ModelManager::paramChanged().
void invt_allocation_debug_print | ( | bool | ) |
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.
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.
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.
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.
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.
Referenced by EnvVisualCortexBase::stop2(), and submain().
void invt_deallocate_aux | ( | void * | mem | ) |
Deallocate the given memory region.
Definition at line 521 of file AllocAux.C.
Referenced by invt_deallocate().