Open CASCADE Technology 7.8.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.
 
 ~LogFileHandler ()
 Destructor.
 
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.
 
void Close ()
 Close the file and stop collecting events.
 
virtual void AllocEvent (size_t, long)
 Allocation event handler.
 
virtual void FreeEvent (void *, size_t, long)
 Freeing event handler.
 

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.
 

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

◆ LogFileHandler()

OSD_MAllocHook::LogFileHandler::LogFileHandler ( )

Constructor.

◆ ~LogFileHandler()

OSD_MAllocHook::LogFileHandler::~LogFileHandler ( )

Destructor.

Member Function Documentation

◆ AllocEvent()

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.

◆ Close()

void OSD_MAllocHook::LogFileHandler::Close ( )

Close the file and stop collecting events.

◆ FreeEvent()

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.

◆ MakeReport()

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.

◆ Open()

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: