CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions
Alloc.h File Reference
#include <stddef.h>

Go to the source code of this file.

Macros

#define BigAlloc(size)   MyAlloc(size)
 
#define BigFree(address)   MyFree(address)
 
#define MidAlloc(size)   MyAlloc(size)
 
#define MidFree(address)   MyFree(address)
 

Functions

void * MyAlloc (size_t size)
 
void MyFree (void *address)
 

Macro Definition Documentation

#define BigAlloc (   size)    MyAlloc(size)

Definition at line 29 of file Alloc.h.

#define BigFree (   address)    MyFree(address)

Definition at line 30 of file Alloc.h.

#define MidAlloc (   size)    MyAlloc(size)

Definition at line 27 of file Alloc.h.

#define MidFree (   address)    MyFree(address)

Definition at line 28 of file Alloc.h.

Function Documentation

void* MyAlloc ( size_t  size)

Definition at line 23 of file Alloc.cc.

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by SzAlloc().

24 {
25  if (size == 0)
26  return 0;
27  #ifdef _SZ_ALLOC_DEBUG
28  {
29  void *p = malloc(size);
30  fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p);
31  return p;
32  }
33  #else
34  return malloc(size);
35  #endif
36 }
tuple size
Write out results.
void MyFree ( void *  address)

Definition at line 38 of file Alloc.cc.

Referenced by SzFree().

39 {
40  #ifdef _SZ_ALLOC_DEBUG
41  if (address != 0)
42  fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address);
43  #endif
44  free(address);
45 }