GADGET-4
mymalloc.h File Reference

declares class that organizes the dynamic memory allocation More...

#include <stdio.h>
#include "../mpi_utils/setcomm.h"

Go to the source code of this file.

Classes

class  memory
 

Macros

#define CACHELINESIZE   64
 
#define MAXBLOCKS   5000
 
#define MAXCHARS   40
 
#define LOC   __FUNCTION__, __FILE__, __LINE__
 
#define MMM(x, y)   (x, #x, y, __FUNCTION__, __FILE__, __LINE__)
 
#define DDD(x)   (x, __FUNCTION__, __FILE__, __LINE__)
 
#define mymalloc(x, y)   mymalloc_movable_fullinfo(NULL, x, y, __FUNCTION__, __FILE__, __LINE__, 0, 0, NULL)
 
#define mymalloc_clear(x, y)   mymalloc_movable_fullinfo(NULL, x, y, __FUNCTION__, __FILE__, __LINE__, 0, 1, NULL)
 
#define mymalloc_g(x, y)   mymalloc_movable_fullinfo(NULL, x, y, __FUNCTION__, __FILE__, __LINE__, 0, 0, callorigin)
 
#define mymalloc_movable(x, y, z)   mymalloc_movable_fullinfo(x, y, z, __FUNCTION__, __FILE__, __LINE__, 1, 0, NULL)
 
#define mymalloc_movable_clear(x, y, z)   mymalloc_movable_fullinfo(x, y, z, __FUNCTION__, __FILE__, __LINE__, 1, 1, NULL)
 
#define mymalloc_movable_g(x, y, z)   mymalloc_movable_fullinfo(x, y, z, __FUNCTION__, __FILE__, __LINE__, 1, 0, callorigin)
 
#define myfree(x)   myfree_movable_fullinfo(x, __FUNCTION__, __FILE__, __LINE__, 0)
 
#define myfree_movable(x)   myfree_movable_fullinfo(x, __FUNCTION__, __FILE__, __LINE__, 1)
 
#define myrealloc(x, y)   myrealloc_movable_fullinfo(x, y, __FUNCTION__, __FILE__, __LINE__, 0)
 
#define myrealloc_movable(x, y)   myrealloc_movable_fullinfo(x, y, __FUNCTION__, __FILE__, __LINE__, 1)
 

Variables

memory Mem
 

Detailed Description

declares class that organizes the dynamic memory allocation

Definition in file mymalloc.h.

Macro Definition Documentation

◆ CACHELINESIZE

#define CACHELINESIZE   64

Definition at line 17 of file mymalloc.h.

◆ DDD

#define DDD (   x)    (x, __FUNCTION__, __FILE__, __LINE__)

Definition at line 24 of file mymalloc.h.

◆ LOC

#define LOC   __FUNCTION__, __FILE__, __LINE__

Definition at line 22 of file mymalloc.h.

◆ MAXBLOCKS

#define MAXBLOCKS   5000

Definition at line 19 of file mymalloc.h.

◆ MAXCHARS

#define MAXCHARS   40

Definition at line 20 of file mymalloc.h.

◆ MMM

#define MMM (   x,
 
)    (x, #x, y, __FUNCTION__, __FILE__, __LINE__)

Definition at line 23 of file mymalloc.h.

◆ myfree

#define myfree (   x)    myfree_movable_fullinfo(x, __FUNCTION__, __FILE__, __LINE__, 0)

Definition at line 34 of file mymalloc.h.

◆ myfree_movable

#define myfree_movable (   x)    myfree_movable_fullinfo(x, __FUNCTION__, __FILE__, __LINE__, 1)

Definition at line 35 of file mymalloc.h.

◆ mymalloc

#define mymalloc (   x,
 
)    mymalloc_movable_fullinfo(NULL, x, y, __FUNCTION__, __FILE__, __LINE__, 0, 0, NULL)

Definition at line 26 of file mymalloc.h.

◆ mymalloc_clear

#define mymalloc_clear (   x,
 
)    mymalloc_movable_fullinfo(NULL, x, y, __FUNCTION__, __FILE__, __LINE__, 0, 1, NULL)

Definition at line 27 of file mymalloc.h.

◆ mymalloc_g

#define mymalloc_g (   x,
 
)    mymalloc_movable_fullinfo(NULL, x, y, __FUNCTION__, __FILE__, __LINE__, 0, 0, callorigin)

Definition at line 28 of file mymalloc.h.

◆ mymalloc_movable

#define mymalloc_movable (   x,
  y,
 
)    mymalloc_movable_fullinfo(x, y, z, __FUNCTION__, __FILE__, __LINE__, 1, 0, NULL)

Definition at line 30 of file mymalloc.h.

◆ mymalloc_movable_clear

#define mymalloc_movable_clear (   x,
  y,
 
)    mymalloc_movable_fullinfo(x, y, z, __FUNCTION__, __FILE__, __LINE__, 1, 1, NULL)

Definition at line 31 of file mymalloc.h.

◆ mymalloc_movable_g

#define mymalloc_movable_g (   x,
  y,
 
)    mymalloc_movable_fullinfo(x, y, z, __FUNCTION__, __FILE__, __LINE__, 1, 0, callorigin)

Definition at line 32 of file mymalloc.h.

◆ myrealloc

#define myrealloc (   x,
 
)    myrealloc_movable_fullinfo(x, y, __FUNCTION__, __FILE__, __LINE__, 0)

Definition at line 37 of file mymalloc.h.

◆ myrealloc_movable

#define myrealloc_movable (   x,
 
)    myrealloc_movable_fullinfo(x, y, __FUNCTION__, __FILE__, __LINE__, 1)

Definition at line 38 of file mymalloc.h.

Variable Documentation

◆ Mem

memory Mem
extern

Definition at line 44 of file main.cc.