Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations

Référence du fichier mmgr.h

#include <new>
#include <stddef.h>
#include "nommgr.h"

Graphe des dépendances par inclusion pour mmgr.h:

Include dependency graph

Ce graphe montre quels fichiers incluent directement ou indirectement ce fichier:

Included by dependency graph

Aller au code source de ce fichier.

Composants

struct  sMStats
struct  tag_au

Définitions des macros

#define __FUNCTION__   "??"
#define new   (m_setOwner (__FILE__,__LINE__,__FUNCTION__),false) ? NULL : new
#define delete   (m_setOwner (__FILE__,__LINE__,__FUNCTION__),false) ? m_setOwner("",0,"") : delete
#define malloc(sz)   m_allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_malloc,sz)
#define calloc(sz)   m_allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_calloc,sz)
#define realloc(ptr, sz)   m_reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr)
#define free(ptr)   m_deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr)

Définitions des types

typedef tag_au sAllocUnit

Fonctions

void m_setOwner (const char *file, const unsigned int line, const char *func)
bool & m_breakOnRealloc (void *reportedAddress)
bool & m_breakOnDealloc (void *reportedAddress)
void * m_allocator (const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, const unsigned int allocationType, const size_t reportedSize)
void * m_reallocator (const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, const unsigned int reallocationType, const size_t reportedSize, void *reportedAddress)
void m_deallocator (const char *sourceFile, const unsigned int sourceLine, const char *sourceFunc, const unsigned int deallocationType, const void *reportedAddress)
bool m_validateAddress (const void *reportedAddress)
bool m_validateAllocUnit (const sAllocUnit *allocUnit)
bool m_validateAllAllocUnits ()
unsigned int m_calcUnused (const sAllocUnit *allocUnit)
unsigned int m_calcAllUnused ()
void m_dumpAllocUnit (const sAllocUnit *allocUnit, const char *prefix="")
void m_dumpMemoryReport (const char *filename="memreport.log", const bool overwrite=true)
sMStats m_getMemoryStatistics ()
void * operator new (size_t reportedSize) throw (std::bad_alloc)
void * operator new[] (size_t reportedSize) throw (std::bad_alloc)
void * operator new (size_t reportedSize, const char *sourceFile, int sourceLine)
void * operator new[] (size_t reportedSize, const char *sourceFile, int sourceLine)
void operator delete (void *reportedAddress)
void operator delete[] (void *reportedAddress)

Variables

const unsigned int m_alloc_unknown
const unsigned int m_alloc_new
const unsigned int m_alloc_new_array
const unsigned int m_alloc_malloc
const unsigned int m_alloc_calloc
const unsigned int m_alloc_realloc
const unsigned int m_alloc_delete
const unsigned int m_alloc_delete_array
const unsigned int m_alloc_free


Documentation de la macro

#define __FUNCTION__   "??"
 

#define calloc sz   )     m_allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_calloc,sz)
 

#define delete   (m_setOwner (__FILE__,__LINE__,__FUNCTION__),false) ? m_setOwner("",0,"") : delete
 

#define free ptr   )     m_deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr)
 

#define malloc sz   )     m_allocator (__FILE__,__LINE__,__FUNCTION__,m_alloc_malloc,sz)
 

#define new   (m_setOwner (__FILE__,__LINE__,__FUNCTION__),false) ? NULL : new
 

#define realloc ptr,
sz   )     m_reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr)
 


Documentation du type

typedef struct tag_au sAllocUnit
 


Documentation de la fonction

void* m_allocator const char *  sourceFile,
const unsigned int  sourceLine,
const char *  sourceFunc,
const unsigned int  allocationType,
const size_t  reportedSize
 

bool& m_breakOnDealloc void *  reportedAddress  ) 
 

bool& m_breakOnRealloc void *  reportedAddress  ) 
 

unsigned int m_calcAllUnused  ) 
 

unsigned int m_calcUnused const sAllocUnit allocUnit  ) 
 

void m_deallocator const char *  sourceFile,
const unsigned int  sourceLine,
const char *  sourceFunc,
const unsigned int  deallocationType,
const void *  reportedAddress
 

void m_dumpAllocUnit const sAllocUnit allocUnit,
const char *  prefix = ""
 

void m_dumpMemoryReport const char *  filename = "memreport.log",
const bool  overwrite = true
 

sMStats m_getMemoryStatistics  ) 
 

void* m_reallocator const char *  sourceFile,
const unsigned int  sourceLine,
const char *  sourceFunc,
const unsigned int  reallocationType,
const size_t  reportedSize,
void *  reportedAddress
 

void m_setOwner const char *  file,
const unsigned int  line,
const char *  func
 

bool m_validateAddress const void *  reportedAddress  ) 
 

bool m_validateAllAllocUnits  ) 
 

bool m_validateAllocUnit const sAllocUnit allocUnit  ) 
 

void operator delete void *  reportedAddress  ) 
 

void operator delete[] void *  reportedAddress  ) 
 

void* operator new size_t  reportedSize,
const char *  sourceFile,
int  sourceLine
 

void* operator new size_t  reportedSize  )  throw (std::bad_alloc)
 

void* operator new[] size_t  reportedSize,
const char *  sourceFile,
int  sourceLine
 

void* operator new[] size_t  reportedSize  )  throw (std::bad_alloc)
 


Documentation de la variable

const unsigned int m_alloc_calloc
 

const unsigned int m_alloc_delete
 

const unsigned int m_alloc_delete_array
 

const unsigned int m_alloc_free
 

const unsigned int m_alloc_malloc
 

const unsigned int m_alloc_new
 

const unsigned int m_alloc_new_array
 

const unsigned int m_alloc_realloc
 

const unsigned int m_alloc_unknown
 


Généré le Mon Mar 1 01:30:07 2004 par doxygen 1.3.3