Open CASCADE Technology  6.9.0
Public Member Functions | Static Public Member Functions

OSD_MAllocHook::LogFileHandler Class Reference

#include <OSD_MAllocHook.hxx>

Inheritance diagram for OSD_MAllocHook::LogFileHandler:
Inheritance graph
[legend]

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...
 

Detailed Description

Implementation of the handler that collects all events to the log file. It contains the method to generate the report from the log file.

Constructor & Destructor Documentation

OSD_MAllocHook::LogFileHandler::LogFileHandler ( )

Constructor.

OSD_MAllocHook::LogFileHandler::~LogFileHandler ( )

Destructor.

Member Function Documentation

virtual void OSD_MAllocHook::LogFileHandler::AllocEvent ( size_t  theSize,
long  theRequestNum 
)
virtual

Allocation event handler.

It is called when allocation is done

Parameters
theSizethe size of the memory block in bytes
theRequestNumthe allocation order number of the memory block

Implements OSD_MAllocHook::Callback.

void OSD_MAllocHook::LogFileHandler::Close ( )

Close the file and stop collecting events.

virtual void OSD_MAllocHook::LogFileHandler::FreeEvent ( void *  theData,
size_t  theSize,
long  theRequestNum 
)
virtual

Freeing event handler.

It is called when the block is freed

Parameters
theDatathe pointer to the user data section of the memory block
theSizethe size of the memory block in bytes
theRequestNumthe allocation order number of the memory block

Implements OSD_MAllocHook::Callback.

static Standard_Boolean OSD_MAllocHook::LogFileHandler::MakeReport ( const char *  theLogFile,
const char *  theOutFile,
const Standard_Boolean  theIncludeAlive = Standard_False 
)
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.


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