Geant4
10.00.p01
|
#include <iostream>
#include <stdio.h>
#include <time.h>
#include "tls.hh"
#include "tpmalloc/mymalloc.h"
Go to the source code of this file.
Macros | |
#define | HJMALLOCDEBUG 0 |
#define | HJMALLOCPROFILE 0 |
#define | TLMSSIZE 256 |
Functions | |
void | turnontpmalloc () |
void | turnofftpmalloc () |
int | tpmallocflag () |
void * | malloc (size_t __size) |
void * | calloc (size_t __nmemb, size_t __size) |
void * | realloc (void *__ptr, size_t __size) |
void | free (void *__ptr) |
void | cfree (void *__ptr) |
void * | valloc (size_t __size) |
Variables | |
G4ThreadLocal int | mallocswitch = 0 |
G4ThreadLocal mspace | tlms = 0 |
G4ThreadLocal long int | alloccount = 0 |
G4ThreadLocal long int | freecount = 0 |
G4ThreadLocal double | alloctime = 0.0 |
G4ThreadLocal double | freetime = 0.0 |
#define HJMALLOCDEBUG 0 |
Definition at line 17 of file hjmalloc.cc.
#define HJMALLOCPROFILE 0 |
Definition at line 18 of file hjmalloc.cc.
#define TLMSSIZE 256 |
void* calloc | ( | size_t | __nmemb, |
size_t | __size | ||
) |
Definition at line 67 of file hjmalloc.cc.
References alloccount, alloctime, create_mspace(), mallocswitch, mspace_calloc(), tlms, and TLMSSIZE.
Referenced by zcalloc().
void cfree | ( | void * | __ptr | ) |
Definition at line 174 of file hjmalloc.cc.
References freecount, freetime, mallocswitch, mspace_free(), and tlms.
void free | ( | void * | __ptr | ) |
Definition at line 140 of file hjmalloc.cc.
References freecount, freetime, mallocswitch, mspace_free(), and tlms.
Referenced by G4PDefSplitter< T >::FreeSlave(), G4VUPLSplitter< T >::FreeSlave(), G4GeomSplitter< T >::FreeSlave(), gString_release(), gz_error(), gz_init(), gz_look(), gz_open(), gzclose_r(), gzclose_w(), gzdopen(), parserCreate(), G4VInteractorManager::SetArguments(), smr_release(), smr_setMessage(), tpi_spectralID_release(), tpia_misc_setMessageError_Element(), xData_free(), zcfree(), and G4VInteractorManager::~G4VInteractorManager().
void* malloc | ( | size_t | __size | ) |
Definition at line 30 of file hjmalloc.cc.
References alloccount, alloctime, create_mspace(), mallocswitch, mspace_malloc(), tlms, and TLMSSIZE.
Referenced by G4EnhancedVecAllocator< _Tp >::allocate(), AllocateInProtectedHeap(), AllocateProtectedHeap(), gz_error(), gz_init(), gz_look(), gz_open(), gzdopen(), insertAddress(), parserCreate(), G4VInteractorManager::SetArguments(), toString(), xData_smrUserInterface(), and zcalloc().
void* realloc | ( | void * | __ptr, |
size_t | __size | ||
) |
Definition at line 103 of file hjmalloc.cc.
References alloccount, alloctime, create_mspace(), freecount, mallocswitch, mspace_realloc(), tlms, and TLMSSIZE.
Referenced by addStringToXML(), G4EnhancedVecAllocator< _Tp >::allocate(), G4GeomSplitter< T >::CreateSubInstance(), insertAddress(), G4PDefSplitter< T >::NewSubInstances(), G4VUPLSplitter< T >::NewSubInstances(), parserCreate(), G4GeomSplitter< T >::SlaveCopySubInstanceArray(), G4VUPLSplitter< T >::SlaveCopySubInstanceArray(), G4GeomSplitter< T >::SlaveInitializeSubInstance(), smr_setMessage(), smr_vallocateFormatMessage(), and xData_realloc().
int tpmallocflag | ( | ) |
Definition at line 28 of file hjmalloc.cc.
References mallocswitch.
void turnofftpmalloc | ( | ) |
Definition at line 27 of file hjmalloc.cc.
References mallocswitch.
void turnontpmalloc | ( | ) |
Definition at line 26 of file hjmalloc.cc.
References mallocswitch.
void* valloc | ( | size_t | __size | ) |
Definition at line 208 of file hjmalloc.cc.
References alloccount, alloctime, create_mspace(), mallocswitch, mspace_malloc(), tlms, and TLMSSIZE.
G4ThreadLocal long int alloccount = 0 |
G4ThreadLocal double alloctime = 0.0 |
G4ThreadLocal long int freecount = 0 |
Definition at line 12 of file hjmalloc.cc.
G4ThreadLocal double freetime = 0.0 |
Definition at line 15 of file hjmalloc.cc.
G4ThreadLocal int mallocswitch = 0 |
Definition at line 8 of file hjmalloc.cc.
Referenced by calloc(), cfree(), free(), malloc(), realloc(), tpmallocflag(), turnofftpmalloc(), turnontpmalloc(), and valloc().
G4ThreadLocal mspace tlms = 0 |