soma-io  5.0.5
soma::NullAllocator Class Reference

This allocator doesn't allocate anything. More...

#include <soma-io/allocator/allocator.h>

Inheritance diagram for soma::NullAllocator:
Collaboration diagram for soma::NullAllocator:

Public Member Functions

virtual ~NullAllocator ()
 
virtual char * allocate (size_t n, size_t elemsize, DataSource *datasource) const
 
virtual void deallocate (char *ptr, size_t n, size_t sz) const
 
- Public Member Functions inherited from soma::LowLevelAllocator
virtual ~LowLevelAllocator ()
 
virtual bool canDuplicate () const
 

Static Public Member Functions

static const NullAllocatorsingleton ()
 

Additional Inherited Members

- Protected Member Functions inherited from soma::LowLevelAllocator
 LowLevelAllocator ()
 

Detailed Description

This allocator doesn't allocate anything.

NullAllocator is used to "fake" allocation and use data already allocated (and owned) by other structures

Definition at line 108 of file allocator.h.

Constructor & Destructor Documentation

◆ ~NullAllocator()

virtual soma::NullAllocator::~NullAllocator ( )
virtual

Member Function Documentation

◆ allocate()

virtual char* soma::NullAllocator::allocate ( size_t  n,
size_t  elemsize,
DataSource datasource 
) const
virtual

◆ deallocate()

virtual void soma::NullAllocator::deallocate ( char *  ptr,
size_t  n,
size_t  sz 
) const
virtual

◆ singleton()

static const NullAllocator& soma::NullAllocator::singleton ( )
static

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