dmem -- Structure (C) or array (Fortran) containing the following values
(Fortran values can be accessed using the specified indices):
peak [PAPIF_DMEM_VMPEAK] (Peak size of process image, may be 0 on older Linux systems),
size [PAPIF_DMEM_VMSIZE] (Size of process image),
resident [PAPIF_DMEM_RESIDENT] (Resident set size),
high_water_mark [PAPIF_DMEM_HIGH_WATER] (High water memory usage),
shared [PAPIF_DMEM_SHARED] (Shared memory),
text [PAPIF_DMEM_TEXT] (Memory allocated to code),
library [PAPIF_DMEM_LIBRARY] (Memory allocated to libraries),
heap [PAPIF_DMEM_HEAP] (Size of the heap),
locked [PAPIF_DMEM_LOCKED] (Locked memory),
stack [PAPIF_DMEM_STACK] (Size of the stack)
pagesize [PAPIF_DMEM_PAGESIZE] (Size of a page in bytes),
pte [PAPIF_DMEM_PTE] (Size of page table entries, may be 0 on older Linux systems)
int retval;
PAPI_dmem_info_t dmem;
if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT)
exit(1);
retval = PAPI_library_init(PAPI_VER_CURRENT);
if (retval != PAPI_VER_CURRENT)
handle_error(retval);
PAPI_get_dmem_info(&dmem);
printf("Peak Mem Size: %lld0,dmem.peak);
printf("Mem Size: %lld0,dmem.size);
printf("Mem Resident: %lld0,dmem.resident);
printf("Peak Resident: %lld0,dmem.high_water_mark);
printf("Mem Shared: %lld0,dmem.shared);
printf("Mem Text: %lld0,dmem.text);
printf("Mem Library: %lld0,dmem.library);
printf("Mem Heap: %lld0,dmem.heap);
printf("Mem Locked: %lld0,dmem.locked);
printf("Mem Stack: %lld0,dmem.stack);
printf("Mem Pagesize: %lld0,dmem.pagesize);
printf("Mem Page Eable Entries: %lld0,dmem.pte);