host_memory_info.h File Reference

Get current memory status. More...

`#include "int_sizes.h"`

Go to the source code of this file.

## Functions

int | host_memory_info_get (UINT64_T *avail, UINT64_T *total)
| Get current memory status.
int | host_memory_usage_get (UINT64_T *rss, UINT64_T *total)
| Get current memory usage by this process.

## Detailed Description

Get current memory status.

## Function Documentation

## host_memory_info_get()

int host_memory_info_get | ( | UINT64_T * | avail,
|  | UINT64_T * | total )

Get current memory status.

Uses various techniques on different processors to get the physical amount of memory installed, and the amount currently available.

Parameters

  avail | Will be filled in with the memory currently available, measured in bytes.
  total | Will be filled in with the memory physically installed, measured in bytes.

Returns
  One on success, zero on failure.

## host_memory_usage_get()

int host_memory_usage_get | ( | UINT64_T * | rss,
|  | UINT64_T * | total )

Get current memory usage by this process.

Parameters

  rss | Will be filled in with the current resident memory usage of this process, in bytes.
  total | Will be filled in with the total virtual memory size of this process, in bytes.