Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

debug::LeakCheckerRegistry Class Reference

メモリの動的確保の情報を保持する。. More...

List of all members.

Public Types

enum  Method {
  UNKNOWN, CALLOC, MALLOC, REALLOC,
  FREE, NEW_OBJECT, NEW_ARRAY, DELETE_OBJECT,
  DELETE_ARRAY
}

Public Methods

size_t count () const
 エラーの個数を返す。. More...

void dump (FILE *fp) const
 検査結果を表示する。. More...

void add (void *p, Method method, size_t n, const char *file, int line)
 リストに情報を追加する。. More...

Method remove (void *p, Method method)
 リストから情報を除去する。. More...

void clear ()
 情報を消去する。. More...


Static Public Methods

LeakCheckerRegistry * instance ()
 シングルトンを取得する。. More...

void finalize ()
 終了処理を行う。. More...

bool isAvailable ()
 レジストリが有効か?. More...


Protected Types

typedef MallocAllocator< pair<
const void *, Entry > > 
PairAllocator
typedef map< void *, Entry,
less< void *>, PairAllocator
EntryMap
typedef list< Error, MallocAllocator<
Error > > 
ErrorList

Protected Methods

 LeakCheckerRegistry ()
 ~LeakCheckerRegistry ()
void addError (void *address, Method method2, const Entry &entry)
 エラー情報を追加する。. More...


Static Protected Methods

void printEntry (FILE *fp, void *p, const Entry &entry)
 メモリの動的確保の情報を表示する。. More...

void printError (FILE *fp, const Error &error)
 エラー情報を表示する。. More...


Detailed Description

メモリの動的確保の情報を保持する。.


Member Typedef Documentation

typedef MallocAllocator<pair<const void*, Entry> > debug::LeakCheckerRegistry::PairAllocator [protected]
 

typedef map<void*, Entry, less<void*>, PairAllocator> debug::LeakCheckerRegistry::EntryMap [protected]
 

typedef list<Error, MallocAllocator<Error> > debug::LeakCheckerRegistry::ErrorList [protected]
 


Member Enumeration Documentation

enum debug::LeakCheckerRegistry::Method
 

Enumeration values:
UNKNOWN 
CALLOC 
MALLOC 
REALLOC 
FREE 
NEW_OBJECT 
NEW_ARRAY 
DELETE_OBJECT 
DELETE_ARRAY 


Constructor & Destructor Documentation

debug::LeakCheckerRegistry::LeakCheckerRegistry   [inline, protected]
 

debug::LeakCheckerRegistry::~LeakCheckerRegistry   [protected]
 


Member Function Documentation

LeakCheckerRegistry * debug::LeakCheckerRegistry::instance   [static]
 

シングルトンを取得する。.

void debug::LeakCheckerRegistry::finalize   [static]
 

終了処理を行う。.

bool debug::LeakCheckerRegistry::isAvailable   [inline, static]
 

レジストリが有効か?.

起動時、終了時に未置換の new、delete の処理を制御するため。

size_t debug::LeakCheckerRegistry::count   const
 

エラーの個数を返す。.

void debug::LeakCheckerRegistry::dump FILE *    fp const
 

検査結果を表示する。.

void debug::LeakCheckerRegistry::add void *    p,
Method    method,
size_t    n,
const char *    file,
int    line
 

リストに情報を追加する。.

Parameters:
p  メモリのアドレス。
method  確保を要求した処理。
n  メモリのサイズ。
file  ソースファイル名。
line  ソースファイル行番号。

LeakCheckerRegistry::Method debug::LeakCheckerRegistry::remove void *    p,
Method    method
 

リストから情報を除去する。.

Parameters:
p  メモリのアドレス。
method  解放を要求した処理。
Returns:
確保を要求した処理。

void debug::LeakCheckerRegistry::clear  
 

情報を消去する。.

void debug::LeakCheckerRegistry::addError void *    address,
Method    method2,
const Entry   entry
[inline, protected]
 

エラー情報を追加する。.

Parameters:
address  解放を要求されたアドレス。
method2  解放を要求した処理。
entry  確保時に登録された情報。

void debug::LeakCheckerRegistry::printEntry FILE *    fp,
void *    p,
const Entry   entry
[static, protected]
 

メモリの動的確保の情報を表示する。.

void debug::LeakCheckerRegistry::printError FILE *    fp,
const Error   error
[static, protected]
 

エラー情報を表示する。.


The documentation for this class was generated from the following file:
Generated on Tue May 14 22:56:28 2002 for Debug Utilities by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001