iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Allocation.H File Reference
#include <cstddef>
#include <memory>
#include <mutex>
#include <nrt/Core/Memory/details/AllocationHelpers.H>
#include <nrt/Core/Memory/details/AllocationImpl.H>

Randolph Voorhies


// ////////////////////////////////////////////////////////////////////////
//              The iLab Neuromorphic Robotics Toolkit (NRT)             //
// Copyright 2010-2012 by the University of Southern California (USC)    //
//                          and the iLab at USC.                         //
//                                                                       //
//                iLab - University of Southern California               //
//                Hedco Neurociences Building, Room HNB-10               //
//                    Los Angeles, Ca 90089-2520 - USA                   //
//                                                                       //
//      See for information about this project.      //
// ////////////////////////////////////////////////////////////////////////
// This file is part of The iLab Neuromorphic Robotics Toolkit.          //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is free software: you can      //
// redistribute it and/or modify it under the terms of the GNU General   //
// Public License as published by the Free Software Foundation, either   //
// version 3 of the License, or (at your option) any later version.      //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is distributed in the hope     //
// that it will be useful, but WITHOUT ANY WARRANTY; without even the    //
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR       //
// PURPOSE.  See the GNU General Public License for more details.        //
//                                                                       //
// You should have received a copy of the GNU General Public License     //
// along with The iLab Neuromorphic Robotics Toolkit.  If not, see       //
// <>.                                       //
// ////////////////////////////////////////////////////////////////////////

Definition in file Allocation.H.

Go to the source code of this file.


class  nrt::Allocator< T >
 A C++ STL compatible allocator using nrt::allocate. More...
class  nrt::AlignedAllocator< T, N >
 A c++ STL compatible allocator that always performs aligned allocation. More...


 Reserved namespace for NRT core classes and functions.


void * nrt::allocate (size_t nbytes)
 Allocate nbytes of memory, throwing an exception in case of failure.
void nrt::deallocate (void *mem)
 Deallocate the given memory region.
void nrt::allocation_release_free_mem ()
 Released any cached free memory blocks (e.g. to conserve memory)
void nrt::allocation_allow_caching (bool on)
 Turn on/off caching of memory blocks of commonly-used sizes.
void nrt::allocation_debug_print (bool print)
 Turn on/off memory-allocation debugging statements. More...
void nrt::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. More...
void nrt::allocation_set_stats_units (const size_t units)
 Set the units to be used by default in invt_allocation_show_stats()
template<class T , class... Args>
std::unique_ptr< T > nrt::make_unique (Args &&...args)
 Creates an std::unique_ptr by calling the constructor for T with the specified arguments. More...