VirtualMemory Class Reference

Virtual memory manager. More...

#include <VirtualMemory.h>

Inheritance diagram for VirtualMemory:
TemporaryFile Reference::Able Reference::HeapTracked

Public Member Functions

 VirtualMemory (const std::string &filename, bool unlink=true)
 Construct a virutal memory resource with the given filename. More...
 
 ~VirtualMemory ()
 Destructor.
 
template<typename T >
T * create (unsigned elements)
 Create a new array.
 
void destroy (void *pointer)
 Destroy an existing array.
 
- Public Member Functions inherited from TemporaryFile
 TemporaryFile (const std::string &basename)
 Construct a temporary file with the specified basename. More...
 
 ~TemporaryFile ()
 Close and remove the temporary file. More...
 
void close ()
 Close the temporary file.
 
void unlink ()
 Unlink the temporary file.
 
void remove ()
 Remove the temporary file (close and unlink)
 
int get_fd () const
 Get the file descriptor of the temporary file.
 
std::string get_filename () const
 Get the name of the temporary file.
 
void set_removed (bool flag=true)
 Set to true if the temporary file need not be removed.
 
- Public Member Functions inherited from Reference::Able
 Able ()
 Default constructor.
 
 Able (const Able &)
 Copy constructor.
 
Ableoperator= (const Able &)
 Assignment operator.
 
virtual ~Able ()
 Destructor.
 
unsigned get_reference_count () const
 Returns the number of references there are to this.
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked ()
 Default constructor.
 
 HeapTracked (const HeapTracked &)
 Copy constructor.
 
HeapTrackedoperator= (const HeapTracked &)
 Assignment operator.
 
virtual ~HeapTracked ()
 Destructor.
 
bool __is_on_heap () const
 Return true if this instance is found in heap addresses.
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 Returns the current number instances in existence.
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 Records the addresses of new instances allocated on the heap.
 
static void operator delete (void *location, void *ptr)
 Placement delete overload to match the placement new overload.
 
static void operator delete (void *location)
 Regular delete overload.
 
static size_t get_heap_queue_size ()
 Return the number of heap addresses awaiting processing.
 
- Static Public Attributes inherited from TemporaryFile
static bool abort = true
 Abort after processing any signals.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 Add the address of a reference to this object. More...
 
void __dereference (bool auto_delete=true) const
 Remove the address of a reference to this object. More...
 

Detailed Description

Virtual memory manager.

Constructor & Destructor Documentation

◆ VirtualMemory()

VirtualMemory::VirtualMemory ( const std::string &  filename,
bool  unlink = true 
)

Construct a virutal memory resource with the given filename.

Construct with regular expression.

References TemporaryFile::get_fd(), and TemporaryFile::unlink().


The documentation for this class was generated from the following files:

Generated using doxygen 1.8.17