utilities  0.0
Classes | Namespaces | Typedefs | Functions | Variables
memory.h File Reference
#include <cstddef>
#include <cstdint>
#include <sstream>
#include <iostream>
#include <limits>
#include <string>
#include <unordered_map>
#include <new>
#include <vector>
#include <array>
#include <stdexcept>
#include <cassert>
#include <iterator>
#include <algorithm>
#include <initializer_list>
#include <molpro/memory/memory-config.h>
Include dependency graph for memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  molpro::allocator_< T, A >
 
struct  molpro::allocator_< T, A >::rebind< U >
 
class  molpro::pointer_holder< T, _Alloc >
 A template for a container class like std::vector<T> but with the following features. More...
 
class  molpro::vector< T, _Alloc >
 
class  molpro::vector< T, _Alloc >::MyIterator< IsConst >
 
class  molpro::array< T >
 A template for a container class like std::array<T> but with the following features. More...
 
class  molpro::array< T >::MyIterator< IsConst >
 

Namespaces

 molpro
 Class that manages input options.
 

Typedefs

template<typename T >
using molpro::allocator = allocator_< T, std::allocator< T > >
 
template<typename T = double, typename A = molpro::allocator<T>>
using molpro::stdvector = std::vector< T, A >
 

Functions

size_t memory_initialize (char *buffer, size_t max)
 
size_t memory_used (int maximum=0)
 memory_used Report used memory More...
 
size_t memory_remaining ()
 memory_remaining Report used memory More...
 
void memory_print_status ()
 memory_print_status Print the state of the memory More...
 
void memory_reset_maximum_stack (int64_t level)
 memory_reset_maximum_stack Reset the maximum stack used statistic to the currently-used stack More...
 
template<class T , typename _Alloc >
std::ostream & molpro::operator<< (std::ostream &os, vector< T, _Alloc > const &obj)
 
template<typename T = double, typename _Alloc = molpro::allocator<T>>
std::ptrdiff_t molpro::operator- (const pointer_holder< T > &a, const pointer_holder< T > &b)
 
template<typename T , typename _Alloc >
vector< T, _Alloc >::Iterator molpro::operator+ (const typename vector< T, _Alloc >::Iterator &a, int increment)
 
template<typename T , typename _Alloc >
vector< T, _Alloc >::Iterator molpro::operator- (const typename vector< T, _Alloc >::Iterator &a, int increment)
 
template<class T >
std::ostream & molpro::operator<< (std::ostream &os, array< T > const &obj)
 

Variables

size_t _private_memory_used
 
size_t _private_memory_maximum_allocatable
 
std::unordered_map< char *, size_t > _private_memory_lengths
 

Function Documentation

◆ memory_initialize()

size_t memory_initialize ( char *  buffer,
size_t  max 
)
inline

◆ memory_print_status()

void memory_print_status ( )
inline

memory_print_status Print the state of the memory

◆ memory_remaining()

size_t memory_remaining ( )
inline

memory_remaining Report used memory

Returns
remaining memory in bytes

◆ memory_reset_maximum_stack()

void memory_reset_maximum_stack ( int64_t  level)
inline

memory_reset_maximum_stack Reset the maximum stack used statistic to the currently-used stack

Parameters
levelif non-negative, the stack position desired; default is current stack size in bytes

◆ memory_used()

size_t memory_used ( int  maximum = 0)
inline

memory_used Report used memory

Parameters
maximumif true (default is false), report the maximum memory allocated to date, in bytes.
Returns

Variable Documentation

◆ _private_memory_lengths

std::unordered_map<char*, size_t> _private_memory_lengths
extern

◆ _private_memory_maximum_allocatable

size_t _private_memory_maximum_allocatable
extern

◆ _private_memory_used

size_t _private_memory_used
extern