PAPI 7.1.0.0
|
Go to the source code of this file.
Macros | |
#define | IN_MEM_FILE |
#define | MEM_PROLOG (2*sizeof(void *)) |
#define | MEM_EPILOG 4 |
#define | MEM_EPILOG_1 0xC |
#define | MEM_EPILOG_2 0xA |
#define | MEM_EPILOG_3 0xC |
#define | MEM_EPILOG_4 0xA |
Functions | |
static pmem_t * | get_mem_ptr (void *ptr) |
static pmem_t * | init_mem_ptr (void *, int, char *, int) |
static void | insert_mem_ptr (pmem_t *) |
static void | remove_mem_ptr (pmem_t *) |
static int | set_epilog (pmem_t *mem_ptr) |
void * | _papi_realloc (char *file, int line, void *ptr, size_t size) |
void * | _papi_calloc (char *file, int line, size_t nmemb, size_t size) |
void * | _papi_malloc (char *file, int line, size_t size) |
char * | _papi_strdup (char *file, int line, const char *s) |
int | _papi_valid_free (char *file, int line, void *ptr) |
void | _papi_free (char *file, int line, void *ptr) |
void | _papi_mem_print_info (void *ptr) |
void | _papi_mem_print_stats () |
int | _papi_mem_overhead (int type) |
void | _papi_mem_cleanup_all () |
static int | _papi_mem_check_buf_overflow (pmem_t *tmp) |
int | _papi_mem_check_all_overflow () |
Variables | |
static pmem_t * | mem_head = NULL |
Definition in file papi_memory.c.
#define IN_MEM_FILE |
Definition at line 16 of file papi_memory.c.
#define MEM_EPILOG 4 |
Define the amount of extra memory at the end of the alloc'd pointer. Also define the contents: 0xCACA
Definition at line 38 of file papi_memory.c.
#define MEM_EPILOG_1 0xC |
Definition at line 39 of file papi_memory.c.
#define MEM_EPILOG_2 0xA |
Definition at line 40 of file papi_memory.c.
#define MEM_EPILOG_3 0xC |
Definition at line 41 of file papi_memory.c.
#define MEM_EPILOG_4 0xA |
Definition at line 42 of file papi_memory.c.
#define MEM_PROLOG (2*sizeof(void *)) |
Define the amount of extra memory at the beginning of the alloc'd pointer. This is usually the size of a pointer, but in some cases needs to be bigger to preserve data alignment.
Definition at line 31 of file papi_memory.c.
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.
Definition at line 438 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.
|
static |
Definition at line 344 of file papi_memory.c.
Definition at line 358 of file papi_memory.c.
|
static |
|
static |
Definition at line 405 of file papi_memory.c.
Definition at line 420 of file papi_memory.c.
|
static |
Definition at line 46 of file papi_memory.c.