TPIE

v1.1rc1-6-g0c97303
memory.h File Reference

Memory management subsystem. More...

#include <tpie/config.h>
#include <tpie/util.h>
#include <boost/thread/mutex.hpp>
#include <boost/unordered_map.hpp>
#include <boost/type_traits/is_polymorphic.hpp>
#include <utility>
#include <fstream>

Go to the source code of this file.

Classes

struct  tpie::out_of_memory_error
 Thrown when trying to allocate too much memory. More...
 
class  tpie::memory_manager
 Memory management object used to track memory usage. More...
 
struct  tpie::array_allocation_scope_magic< T >
 
struct  tpie::allocation_scope_magic< T >
 
struct  tpie::auto_ptr_ref< T >
 
class  tpie::auto_ptr< T >
 like std::auto_ptr, but delete the object with tpie_delete. More...
 
class  tpie::allocator< T >
 A allocator object usable in STL containers, using the TPIE memory manager. More...
 
struct  tpie::allocator< T >::rebind< U >
 

Namespaces

 tpie
 TPIE's namespace.
 

Functions

void tpie::init_memory_manager ()
 Used by tpie_init to initialize the memory manager. More...
 
void tpie::finish_memory_manager ()
 Used by tpie_finish to deinitialize the memory manager. More...
 
memory_manager & tpie::get_memory_manager ()
 Return a reference to the memory manager. More...
 
void tpie::__register_pointer (void *p, size_t size, const std::type_info &t)
 
void tpie::__unregister_pointer (void *p, size_t size, const std::type_info &t)
 
void tpie::assert_tpie_ptr (void *p)
 In a debug build, assert that a given pointer has been allocated with tpie_new. More...
 
template<typename D , typename T >
tpie::ptr_cast (T *t)
 Cast between pointer types. More...
 
template<typename T >
T * tpie::__allocate ()
 
template<typename T >
size_t tpie::tpie_size (T *p)
 
template<typename T >
T * tpie::tpie_new_array (size_t size)
 Allocate a new array and register its memory usage. More...
 
template<typename T , typename Args >
T * tpie::tpie_new (Args args)
 Allocate an element of the type given as template parameter, and register its memory usage with TPIE. More...
 
template<typename T >
void tpie::tpie_delete (T *p) throw ()
 Delete an object allocated with tpie_new. More...
 
template<typename T >
void tpie::tpie_delete_array (T *a, size_t size) throw ()
 Delete an array allocated with tpie_new_array. More...
 
template<typename T >
bool tpie::operator== (const tpie::allocator< T > &, const tpie::allocator< T > &)
 
template<typename T >
bool tpie::operator!= (const tpie::allocator< T > &, const tpie::allocator< T > &)
 
size_t tpie::consecutive_memory_available (size_t granularity=5 *1024 *1024)
 Find the largest amount of memory that can be allocated as a single chunk. More...
 
template<typename T >
void std::swap (tpie::auto_ptr< T > &a, tpie::auto_ptr< T > &b)
 

Detailed Description

Memory management subsystem.

Definition in file memory.h.