MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include "memory.h"
Go to the source code of this file.
Functions | |
void | mymalloc_init (double MemoryMB) |
void | tamalloc_init (void) |
void | report_detailed_memory_usage (const char *label, const char *fmt,...) |
Variables | |
Allocator | A_MAIN [1] |
Allocator | A_TEMP [1] |
#define ma_free | ( | p | ) | allocator_free(p) |
Definition at line 23 of file mymalloc.h.
#define ma_malloc | ( | name, | |
type, | |||
nele | |||
) | (type*) allocator_alloc_bot(A_MAIN, name, sizeof(type) * (nele)) |
Definition at line 21 of file mymalloc.h.
#define ma_malloc2 | ( | name, | |
type, | |||
nele | |||
) | (type*) allocator_alloc_top(A_MAIN, name, sizeof(type) * (nele)) |
Definition at line 22 of file mymalloc.h.
#define myfree | ( | x | ) | allocator_free(x) |
Definition at line 19 of file mymalloc.h.
#define mymalloc | ( | name, | |
size | |||
) | allocator_alloc_bot(A_MAIN, name, size) |
Definition at line 15 of file mymalloc.h.
#define mymalloc2 | ( | name, | |
size | |||
) | allocator_alloc_top(A_MAIN, name, size) |
Definition at line 16 of file mymalloc.h.
#define mymalloc_freebytes | ( | ) | allocator_get_free_size(A_MAIN) |
Definition at line 31 of file mymalloc.h.
#define mymalloc_usedbytes | ( | ) | allocator_get_used_size(A_MAIN, ALLOC_DIR_BOTH) |
Definition at line 32 of file mymalloc.h.
#define myrealloc | ( | ptr, | |
size | |||
) | allocator_realloc(A_MAIN, ptr, size) |
Definition at line 18 of file mymalloc.h.
#define report_memory_usage | ( | x | ) | report_detailed_memory_usage(x, "%s:%d", __FILE__, __LINE__) |
Definition at line 30 of file mymalloc.h.
#define ta_free | ( | p | ) | allocator_free(p) |
Definition at line 28 of file mymalloc.h.
#define ta_malloc | ( | name, | |
type, | |||
nele | |||
) | (type*) allocator_alloc_bot(A_TEMP, name, sizeof(type) * (nele)) |
Definition at line 25 of file mymalloc.h.
#define ta_malloc2 | ( | name, | |
type, | |||
nele | |||
) | (type*) allocator_alloc_top(A_TEMP, name, sizeof(type) * (nele)) |
Definition at line 26 of file mymalloc.h.
#define ta_reset | ( | ) | allocator_reset(A_TEMP, 0) |
Definition at line 27 of file mymalloc.h.
void mymalloc_init | ( | double | MemoryMB | ) |
Definition at line 48 of file mymalloc.c.
References A_MAIN, ALLOC_ENOMEMORY, allocator_init(), cluster_get_num_hosts(), endrun(), message(), MPIU_Any(), and NTask.
Referenced by main().
void report_detailed_memory_usage | ( | const char * | label, |
const char * | fmt, | ||
... | |||
) |
Definition at line 75 of file mymalloc.c.
References A_MAIN, ALLOC_DIR_BOTH, allocator_get_used_size(), allocator_print(), fastpm_strdup_vprintf(), highest_memory_usage, message(), myfree, NTask, and ThisTask.
void tamalloc_init | ( | void | ) |
Definition at line 29 of file mymalloc.c.
References A_TEMP, ALLOC_ENOMEMORY, allocator_init(), endrun(), message(), MPIU_Any(), and NTask.
Referenced by main().
|
extern |
Definition at line 17 of file mymalloc.c.
Referenced by mymalloc_init(), and report_detailed_memory_usage().
|
extern |
Definition at line 22 of file mymalloc.c.
Referenced by tamalloc_init().