NAME

PAPI_get_dmem_info - get information about the dynamic memory usage of the current program

CONTENTS

Synopsis
Description
Note
Arguments
Return Values
Errors
Example
Authors
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

 long PAPI_get_dmem_info(int option); 

DESCRIPTION

In C, this function returns a value specified by the option. There is no Fortran equivalent call.

NOTE

The exact calling syntax and returned information for this function is likely to change.

ARGUMENTS

option -- Can currently be one of the following: PAPI_GET_SIZE (Size of process image in pages), PAPI_GET_RESSIZE (Resident set size in pages), PAPI_GET_PAGESIZE (Pagesize in bytes).

RETURN VALUES

On success, this function returns the positive value of the specified option. On error a negative error value is returned.

ERRORS

PAPI_EINVAL
  The value of option is invalid.
PAPI_SYS
  A system error occured.

EXAMPLE


   int retval;

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);

printf("Resident Size in Pages: %ld Size in Pages: %ld Pagesize in bytes: %ld0, PAPI_get_dmem_info(PAPI_GET_RESSIZE), PAPI_get_dmem_info(PAPI_GET_SIZE), PAPI_get_dmem_info(PAPI_GET_PAGESIZE));

AUTHORS

The PAPI Team. See them at the PAPI Web Site: http://icl.cs.utk.edu/projects/papi

BUGS

If called before PAPI_library_init() the behavior of the routine is undefined.

SEE ALSO

PAPI_library_init (3), PAPI_get_opt (3), PAPI_get_hardware_info (3), PAPI_get_executable_info (3)


PAPI Programmer’s Reference PAPI_get_dmem_info (3) November, 2003

  Innovative Computing Laboratory
2001 R&D Winner  
Contact PAPI: papi@cs.utk.edu Computer Science Department
  University of Tennessee