libsysactivity  0.6.5
 All Data Structures Functions Variables Enumerations Enumerator Groups Pages
Data Structures | Functions
Memory interface

Data Structures

struct  sa_memory

Functions

int sa_open_memory (void) SA_EXPORT
int sa_close_memory (void) SA_EXPORT
int sa_get_memory (struct sa_memory *dst) SA_EXPORT SA_NONNULL

Detailed Description

Function Documentation

int sa_open_memory ( void  )

Prepares the resources needed for retrieving memory statistics. This function exists (and is needed) only when SA_OPEN_MEMORY is defined.

Returns
If successful 0 is returned, otherwise an error code is returned. If the operating system is not supported the return value will be ENOTSUP.
See Also
sa_close_memory()
int sa_close_memory ( void  )

This function closes the resources used for retrieving memory statistics. You should call it even when there was a previous error in another function of this API. This function exists (and is needed) only when SA_CLOSE_MEMORY is defined.

Returns
If successful 0 is returned, otherwise an error code is returned.
See Also
sa_open_memory()
int sa_get_memory ( struct sa_memory dst)

Retrieves statistics about the usage of the memory.

Parameters
dstWhere the statistics will be stored.
Returns
If successful 0 is returned, otherwise an error code is returned.