Functions

/tmp/buildd/xz-utils-5.0.0/src/liblzma/common/hardware_physmem.c File Reference

Get the total amount of physical memory (RAM). More...

#include "common.h"
#include "tuklib_physmem.h"

Functions

uint64_t lzma_physmem (void)
 Get the total amount of physical memory (RAM) in bytes.

Detailed Description

Get the total amount of physical memory (RAM).


Function Documentation

uint64_t lzma_physmem ( void   ) 

Get the total amount of physical memory (RAM) in bytes.

This function may be useful when determining a reasonable memory usage limit for decompressing or how much memory it is OK to use for compressing.

Returns:
On success, the total amount of physical memory in bytes is returned. If the amount of RAM cannot be determined, zero is returned. This can happen if an error occurs or if there is no code in liblzma to detect the amount of RAM on the specific operating system.

Referenced by hardware_init().