Open CASCADE Technology 7.7.0
Public Member Functions | Protected Attributes
Standard_MMgrTBBalloc Class Reference

Implementation of OCC memory manager which uses Intel TBB scalable allocator. More...

#include <Standard_MMgrTBBalloc.hxx>

Inheritance diagram for Standard_MMgrTBBalloc:
Inheritance graph
[legend]

Public Member Functions

 Standard_MMgrTBBalloc (const Standard_Boolean aClear=Standard_False)
 Constructor; if aClear is True, the memory will be nullified upon allocation.
 
virtual Standard_Address Allocate (const Standard_Size aSize)
 Allocate aSize bytes.
 
virtual Standard_Address Reallocate (Standard_Address thePtr, const Standard_Size theSize)
 Reallocate aPtr to the size aSize. The new pointer is returned.
 
virtual void Free (Standard_Address thePtr)
 Free allocated memory.
 
- Public Member Functions inherited from Standard_MMgrRoot
virtual ~Standard_MMgrRoot ()
 Virtual destructor; required for correct inheritance.
 
virtual Standard_Address Allocate (const Standard_Size theSize)=0
 Allocate specified number of bytes. The actually allocated space should be rounded up to double word size (4 bytes), as this is expected by implementation of some classes in OCC (e.g. TCollection_AsciiString)
 
virtual Standard_Address Reallocate (Standard_Address thePtr, const Standard_Size theSize)=0
 Reallocate previously allocated memory to contain at least theSize bytes. In case of success, new pointer is returned.
 
virtual void Free (Standard_Address thePtr)=0
 Frees previously allocated memory at specified address.
 
virtual Standard_Integer Purge (Standard_Boolean isDestroyed=Standard_False)
 Purge internally cached unused memory blocks (if any) by releasing them to the operating system. Must return non-zero if some memory has been actually released, or zero otherwise.
 

Protected Attributes

Standard_Boolean myClear
 

Detailed Description

Implementation of OCC memory manager which uses Intel TBB scalable allocator.

On configurations where TBB is not available standard RTL functions malloc() / free() are used.

Constructor & Destructor Documentation

◆ Standard_MMgrTBBalloc()

Standard_MMgrTBBalloc::Standard_MMgrTBBalloc ( const Standard_Boolean  aClear = Standard_False)

Constructor; if aClear is True, the memory will be nullified upon allocation.

Member Function Documentation

◆ Allocate()

virtual Standard_Address Standard_MMgrTBBalloc::Allocate ( const Standard_Size  aSize)
virtual

Allocate aSize bytes.

Implements Standard_MMgrRoot.

◆ Free()

virtual void Standard_MMgrTBBalloc::Free ( Standard_Address  thePtr)
virtual

Free allocated memory.

Implements Standard_MMgrRoot.

◆ Reallocate()

virtual Standard_Address Standard_MMgrTBBalloc::Reallocate ( Standard_Address  thePtr,
const Standard_Size  theSize 
)
virtual

Reallocate aPtr to the size aSize. The new pointer is returned.

Implements Standard_MMgrRoot.

Field Documentation

◆ myClear

Standard_Boolean Standard_MMgrTBBalloc::myClear
protected

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