Open CASCADE Technology 6.6.0
|
#include <NIS_Allocator.hxx>
Public Member Functions | |
NIS_Allocator (const size_t theBlockSize=24600) | |
Standard_Size | NAllocated () const |
Standard_Size | NFreed () const |
void | ResetCounters () |
virtual void * | Allocate (const size_t size) |
virtual void | Free (void *anAddress) |
Free a previously allocated memory. Does nothing. |
Subclass of Incremental Allocator. It is aware of the total allocated and released memory. Used in NIS_Interactive context as private allocator that manages all memory used by interactive objects.
NIS_Allocator::NIS_Allocator | ( | const size_t | theBlockSize = 24600 | ) |
Constructor.
virtual void* NIS_Allocator::Allocate | ( | const size_t | size | ) | [virtual] |
Allocate memory with given size. Returns NULL on failure
Reimplemented from NCollection_IncAllocator.
virtual void NIS_Allocator::Free | ( | void * | anAddress | ) | [virtual] |
Reimplemented from NCollection_IncAllocator.
Standard_Size NIS_Allocator::NAllocated | ( | ) | const [inline] |
Query the total number of allocated bytes
Standard_Size NIS_Allocator::NFreed | ( | ) | const [inline] |
Query the total number of released bytes
void NIS_Allocator::ResetCounters | ( | ) |
Set both counters to zero. Should be called with method Reset of the base class NCollection_IncAlocator.