PAPI 7.1.0.0
|
Go to the source code of this file.
Data Structures | |
struct | pmem_t |
Macros | |
#define | DEBUG_FILE_LEN 20 |
#define | papi_malloc(a) _papi_malloc(__FILE__,__LINE__, a) |
#define | papi_free(a) _papi_free(__FILE__,__LINE__, a) |
#define | papi_realloc(a, b) _papi_realloc(__FILE__,__LINE__,a,b) |
#define | papi_calloc(a, b) _papi_calloc(__FILE__,__LINE__,a,b) |
#define | papi_valid_free(a) _papi_valid_free(__FILE__,__LINE__,a) |
#define | papi_strdup(a) _papi_strdup(__FILE__,__LINE__,a) |
#define | papi_mem_cleanup_all _papi_mem_cleanup_all |
#define | papi_mem_print_info(a) _papi_mem_print_info(a) |
#define | papi_mem_print_stats _papi_mem_print_stats |
#define | papi_mem_overhead(a) _papi_mem_overhead(a) |
#define | papi_mem_check_all_overflow _papi_mem_check_all_overflow |
#define | PAPI_MEM_LIB_OVERHEAD 1 /* PAPI Library Overhead */ |
#define | PAPI_MEM_OVERHEAD 2 /* Memory Overhead */ |
Functions | |
void * | _papi_malloc (char *, int, size_t) |
void | _papi_free (char *, int, void *) |
void * | _papi_realloc (char *, int, void *, size_t) |
void * | _papi_calloc (char *, int, size_t, size_t) |
int | _papi_valid_free (char *, int, void *) |
char * | _papi_strdup (char *, int, const char *s) |
void | _papi_mem_cleanup_all () |
void | _papi_mem_print_info (void *ptr) |
void | _papi_mem_print_stats () |
int | _papi_mem_overhead (int) |
int | _papi_mem_check_all_overflow () |
#define DEBUG_FILE_LEN 20 |
Definition at line 6 of file papi_memory.h.
#define papi_calloc | ( | a, | |
b | |||
) | _papi_calloc(__FILE__,__LINE__,a,b) |
Definition at line 37 of file papi_memory.h.
#define papi_free | ( | a | ) | _papi_free(__FILE__,__LINE__, a) |
Definition at line 35 of file papi_memory.h.
#define papi_malloc | ( | a | ) | _papi_malloc(__FILE__,__LINE__, a) |
Definition at line 34 of file papi_memory.h.
#define papi_mem_check_all_overflow _papi_mem_check_all_overflow |
Definition at line 44 of file papi_memory.h.
#define papi_mem_cleanup_all _papi_mem_cleanup_all |
Definition at line 40 of file papi_memory.h.
#define PAPI_MEM_LIB_OVERHEAD 1 /* PAPI Library Overhead */ |
Definition at line 60 of file papi_memory.h.
#define papi_mem_overhead | ( | a | ) | _papi_mem_overhead(a) |
Definition at line 43 of file papi_memory.h.
#define PAPI_MEM_OVERHEAD 2 /* Memory Overhead */ |
Definition at line 61 of file papi_memory.h.
#define papi_mem_print_info | ( | a | ) | _papi_mem_print_info(a) |
Definition at line 41 of file papi_memory.h.
#define papi_mem_print_stats _papi_mem_print_stats |
Definition at line 42 of file papi_memory.h.
#define papi_realloc | ( | a, | |
b | |||
) | _papi_realloc(__FILE__,__LINE__,a,b) |
Definition at line 36 of file papi_memory.h.
#define papi_strdup | ( | a | ) | _papi_strdup(__FILE__,__LINE__,a) |
Definition at line 39 of file papi_memory.h.
#define papi_valid_free | ( | a | ) | _papi_valid_free(__FILE__,__LINE__,a) |
Definition at line 38 of file papi_memory.h.
Definition at line 113 of file papi_memory.c.
void _papi_free | ( | char * | file, |
int | line, | ||
void * | ptr | ||
) |
Frees up the ptr
Definition at line 226 of file papi_memory.c.
Definition at line 124 of file papi_memory.c.
int _papi_mem_check_all_overflow | ( | ) |
Definition at line 470 of file papi_memory.c.
void _papi_mem_cleanup_all | ( | ) |
Clean all memory up and print out memory leak information to stderr
Definition at line 303 of file papi_memory.c.
Return the amount of memory overhead of the PAPI library and the memory system PAPI_MEM_LIB_OVERHEAD is the library overhead PAPI_MEM_OVERHEAD is the memory overhead They both can be | together This only includes "malloc'd memory"
Definition at line 280 of file papi_memory.c.
void _papi_mem_print_info | ( | void * | ptr | ) |
Print information about the memory including file and location it came from
Definition at line 247 of file papi_memory.c.
void _papi_mem_print_stats | ( | ) |
Print out all memory information
Definition at line 262 of file papi_memory.c.
_papi_realloc – given a pointer returned by _papi_malloc, returns a pointer to the related pmem_t structure describing this pointer. Checks for NULL pointers and returns NULL if error.
Definition at line 77 of file papi_memory.c.
char * _papi_strdup | ( | char * | file, |
int | line, | ||
const char * | s | ||
) |
Definition at line 169 of file papi_memory.c.
Only frees the memory if PAPI malloced it returns 1 if pointer was valid; 0 if not
Definition at line 191 of file papi_memory.c.