| 
    Open CASCADE Technology 7.8.2.dev
    
   | 
 
#include <OSD_MAllocHook.hxx>

Data Structures | |
| struct | Numbers | 
Public Member Functions | |
| CollectBySize () | |
| Constructor.   | |
| ~CollectBySize () | |
| Destructor.   | |
| void | Reset () | 
| Reset the buffer and start collecting events.   | |
| Standard_Boolean | MakeReport (const char *theOutFile) | 
| Write report in the given file.   | |
| virtual void | AllocEvent (size_t, long) | 
| Allocation event handler.   | |
| virtual void | FreeEvent (void *, size_t, long) | 
| Freeing event handler.   | |
Data Fields | |
| Standard_Mutex | myMutex | 
| used for thread-safe access   | |
| Numbers * | myArray | 
| indexed from 0 to myMaxAllocSize-1   | |
| ptrdiff_t | myTotalLeftSize | 
| currently remained allocated size   | |
| size_t | myTotalPeakSize | 
| maximum cumulative allocated size   | |
| size_t | myBreakSize | 
| user defined allocation size to debug (see place_for_breakpoint())   | |
| size_t | myBreakPeak | 
| user defined peak size limit to debug   | |
Static Public Attributes | |
| static const size_t | myMaxAllocSize | 
| maximum tracked size   | |
Implementation of the handler that collects numbers of allocations/deallocations for each block size directly in the memory.
| OSD_MAllocHook::CollectBySize::CollectBySize | ( | ) | 
Constructor.
| OSD_MAllocHook::CollectBySize::~CollectBySize | ( | ) | 
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.
      
  | 
  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.
| Standard_Boolean OSD_MAllocHook::CollectBySize::MakeReport | ( | const char * | theOutFile | ) | 
Write report in the given file.
| void OSD_MAllocHook::CollectBySize::Reset | ( | ) | 
Reset the buffer and start collecting events.
| Numbers* OSD_MAllocHook::CollectBySize::myArray | 
indexed from 0 to myMaxAllocSize-1
| size_t OSD_MAllocHook::CollectBySize::myBreakPeak | 
user defined peak size limit to debug
| size_t OSD_MAllocHook::CollectBySize::myBreakSize | 
user defined allocation size to debug (see place_for_breakpoint())
| Standard_Mutex OSD_MAllocHook::CollectBySize::myMutex | 
used for thread-safe access
| ptrdiff_t OSD_MAllocHook::CollectBySize::myTotalLeftSize | 
currently remained allocated size
| size_t OSD_MAllocHook::CollectBySize::myTotalPeakSize | 
maximum cumulative allocated size