PAPI 7.1.0.0
Loading...
Searching...
No Matches
darwin-memory.h File Reference
This graph shows which files directly or indirectly include this file:

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

◆ _darwin_get_dmem_info()

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}
#define PAPI_OK
Definition: f90papi.h:73
#define PAPI_ESYS
Definition: f90papi.h:136
long long size
Definition: papi.h:867
long long pagesize
Definition: papi.h:876

◆ _darwin_get_memory_info()

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}
int retval
Definition: zero_fork.c:53
Here is the caller graph for this function:

◆ _darwin_update_shlib_info()

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}
Here is the caller graph for this function: