1 // File: Standard_MMgrRaw.hxx
2 // Created: Tue Mar 15 12:05:43 2005
3 // Author: Peter KURNEV
6 #ifndef _Standard_MMgrRaw_HeaderFile
7 #define _Standard_MMgrRaw_HeaderFile
9 #ifndef _Standard_Address_HeaderFile
10 #include <Standard_Address.hxx>
12 #ifndef _Standard_Integer_HeaderFile
13 #include <Standard_Integer.hxx>
15 #ifndef _Standard_Macro_HeaderFile
16 #include <Standard_Macro.hxx>
18 #ifndef _Standard_MMgrRoot_HeaderFile
19 #include <Standard_MMgrRoot.hxx>
23 * Implementation of raw OCC memory manager which uses standard C
24 * functions: malloc (or calloc), free and realloc
25 * without any optimization
28 class Standard_MMgrRaw : public Standard_MMgrRoot
31 //! Constructor; if aClear is True, the memory will be nullified
33 Standard_EXPORT Standard_MMgrRaw(const Standard_Boolean aClear=Standard_False);
35 //! Allocate aSize bytes
36 Standard_EXPORT virtual Standard_Address Allocate(const Standard_Size aSize);
38 //! Reallocate aPtr to the size aSize.
39 //! The pointer aPtr is nullified; new pointer is returned.
40 Standard_EXPORT virtual Standard_Address Reallocate(Standard_Address& aPtr,
41 const Standard_Size aSize);
43 //! Free allocated memory. The pointer is nullified.
44 Standard_EXPORT virtual void Free(Standard_Address&);
47 Standard_Boolean myClear; //! Option to nullify allocated memory