PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
darwin-memory.c File Reference
Include dependency graph for darwin-memory.c:

Go to the source code of this file.

Functions

int _darwin_get_dmem_info (PAPI_dmem_info_t *d)
 
int _darwin_get_memory_info (PAPI_hw_info_t *hwinfo, int cpu_type)
 
int _darwin_update_shlib_info (papi_mdi_t *mdi)
 

Function Documentation

int _darwin_get_dmem_info ( PAPI_dmem_info_t d)

Definition at line 13 of file darwin-memory.c.

14 {
15 
16  int mib[4];
17  size_t len;
18  char buffer[BUFSIZ];
19  long long ll;
20 
21  /**********/
22  /* memory */
23  /**********/
24  len = 2;
25  sysctlnametomib("hw.memsize", mib, &len);
26 
27  len = 8;
28  if (sysctl(mib, 2, &ll, &len, NULL, 0) == -1) {
29  return PAPI_ESYS;
30  }
31 
32  d->size=ll;
33 
34  d->pagesize = getpagesize( );
35 
36  return PAPI_OK;
37 }
return PAPI_OK
Definition: linux-nvml.c:458
long long pagesize
Definition: papi.h:877
#define PAPI_ESYS
Definition: fpapi.h:108
char * buffer
Definition: iozone.c:1366
long long size
Definition: papi.h:868
int _darwin_get_memory_info ( PAPI_hw_info_t hwinfo,
int  cpu_type 
)

Definition at line 65 of file darwin-memory.c.

66 {
67  ( void ) cpu_type; /*unused */
68  int retval = PAPI_OK;
69 
70  x86_get_memory_info( hwinfo );
71 
72  return retval;
73 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
ssize_t retval
Definition: libasync.c:338

Here is the caller graph for this function:

int _darwin_update_shlib_info ( papi_mdi_t mdi)

Definition at line 76 of file darwin-memory.c.

77 {
78 
79 
80  return PAPI_OK;
81 }
return PAPI_OK
Definition: linux-nvml.c:458

Here is the caller graph for this function: