Open CASCADE Technology
6.9.0
|
#include <OSD_MAllocHook.hxx>
Public Member Functions | |
LogFileHandler () | |
Constructor. More... | |
~LogFileHandler () | |
Destructor. More... | |
Standard_Boolean | Open (const char *theFileName) |
Create the file and start collecting events. Return false if the file with the given name cannot be created. More... | |
void | Close () |
Close the file and stop collecting events. More... | |
virtual void | AllocEvent (size_t, long) |
Allocation event handler. More... | |
virtual void | FreeEvent (void *, size_t, long) |
Freeing event handler. More... | |
Static Public Member Functions | |
static Standard_Boolean | MakeReport (const char *theLogFile, const char *theOutFile, const Standard_Boolean theIncludeAlive=Standard_False) |
Make synthesized report on the given log file. More... | |
Implementation of the handler that collects all events to the log file. It contains the method to generate the report from the log file.
OSD_MAllocHook::LogFileHandler::LogFileHandler | ( | ) |
Constructor.
OSD_MAllocHook::LogFileHandler::~LogFileHandler | ( | ) |
Destructor.
|
virtual |
Allocation event handler.
It is called when allocation is done
theSize | the size of the memory block in bytes |
theRequestNum | the allocation order number of the memory block |
Implements OSD_MAllocHook::Callback.
void OSD_MAllocHook::LogFileHandler::Close | ( | ) |
Close the file and stop collecting events.
|
virtual |
Freeing event handler.
It is called when the block is freed
theData | the pointer to the user data section of the memory block |
theSize | the size of the memory block in bytes |
theRequestNum | the allocation order number of the memory block |
Implements OSD_MAllocHook::Callback.
|
static |
Make synthesized report on the given log file.
Generate an easy to use report in the new file with the given name, taking the given log file as input. If theIncludeAlive is true then include into the report the alive allocation numbers.
Standard_Boolean OSD_MAllocHook::LogFileHandler::Open | ( | const char * | theFileName | ) |
Create the file and start collecting events. Return false if the file with the given name cannot be created.