PAPI_get_dmem_info - Online Linux Manual PageSection : 3
Updated : May, 2006
Source : PAPI Programmer's Reference
Note : PAPI
NAMEPAPI_get_dmem_info − get information about the dynamic memory usage of the current program
SYNOPSISC Interface #include <papi.h>
int PAPI_get_dmem_info(PAPI_dmem_info_t *dmem);.fi Fortran Interface #include "fpapi.h"
PAPIF_get_dmem_info(C_LONG_LONG(*) dmem, C_INT check)
DESCRIPTIONIn C, this function takes a pointer to a PAPI_dmem_info_t structure and returns with the structure fields filled in. In Fortran, this function takes a pointer to an array of long_long values and fills in the array on return. A value of PAPI_EINVAL in any field indicates an undefined parameter.
NOTEThis function is currently implemented only for the Linux operating system.
ARGUMENTSdmem -- 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)
RETURN VALUESOn success, this function returns PAPI_OK with the data structure or array values filled in. On error a negative error value is returned.
ERRORSPAPI_ESBSTR" The funtion is not implemented for the current substrate. PAPI_EINVAL" Any value in the structure or array may be undefined as indicated by this error value. PAPI_SYS" A system error occured.
EXAMPLE 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: %lld\n",dmem.peak);
printf("Mem Size: %lld\n",dmem.size);
printf("Mem Resident: %lld\n",dmem.resident);
printf("Peak Resident: %lld\n",dmem.high_water_mark);
printf("Mem Shared: %lld\n",dmem.shared);
printf("Mem Text: %lld\n",dmem.text);
printf("Mem Library: %lld\n",dmem.library);
printf("Mem Heap: %lld\n",dmem.heap);
printf("Mem Locked: %lld\n",dmem.locked);
printf("Mem Stack: %lld\n",dmem.stack);
printf("Mem Pagesize: %lld\n",dmem.pagesize);
printf("Mem Page Eable Entries: %lld\n",dmem.pte);
BUGSIf called before PAPI_library_init() the behavior of the routine is undefined.
SEE ALSOPAPI_library_init(3)," PAPI_get_opt(3)," PAPI_get_hardware_info(3)," PAPI_get_executable_info(3)" 0
Johanes Gumabo
Data Size : 12,639 byte
man-PAPI_get_dmem_info.3Build : 2024-12-29, 07:25 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 256,928
Visitor ID : :
Visitor IP : 3.129.73.6 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (rof_fi|19|PAPI_get_dmem_info.3|13|1|.fi
) (rof_nr_x|149|PAPI_get_dmem_info.3|100|\n",dmem.peak);| printf("Peak Mem Size:\t\t%lld\n",dmem.peak);
) (rof_nr_x|149|PAPI_get_dmem_info.3|101|\n",dmem.size);| printf("Mem Size:\t\t%lld\n",dmem.size);
) (rof_nr_x|149|PAPI_get_dmem_info.3|102|\n",dmem.resident);| printf("Mem Resident:\t\t%lld\n",dmem.resident);
) (rof_nr_x|149|PAPI_get_dmem_info.3|103|\n",dmem.high_water_mark);| printf("Peak Resident:\t%lld\n",dmem.high_water_mark);
) (rof_nr_x|149|PAPI_get_dmem_info.3|104|\n",dmem.shared);| printf("Mem Shared:\t\t%lld\n",dmem.shared);
) (rof_nr_x|149|PAPI_get_dmem_info.3|105|\n",dmem.text);| printf("Mem Text:\t\t%lld\n",dmem.text);
) (rof_nr_x|149|PAPI_get_dmem_info.3|106|\n",dmem.library);| printf("Mem Library:\t\t%lld\n",dmem.library);
) (rof_nr_x|149|PAPI_get_dmem_info.3|107|\n",dmem.heap);| printf("Mem Heap:\t\t%lld\n",dmem.heap);
) (rof_nr_x|149|PAPI_get_dmem_info.3|108|\n",dmem.locked);| printf("Mem Locked:\t\t%lld\n",dmem.locked);
) (rof_nr_x|149|PAPI_get_dmem_info.3|109|\n",dmem.stack);| printf("Mem Stack:\t\t%lld\n",dmem.stack);
) (rof_nr_x|149|PAPI_get_dmem_info.3|110|\n",dmem.pagesize);| printf("Mem Pagesize:\t\t%lld\n",dmem.pagesize);
) (rof_nr_x|149|PAPI_get_dmem_info.3|111|\n",dmem.pte);| printf("Mem Page Eable Entries:\t\t%lld\n",dmem.pte);
)