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. |
Get the total amount of physical memory (RAM).
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. For example, the default limit used by the xz command line tool is 40 % of RAM.
Referenced by hardware_memlimit_set_percentage(), and memlimit_set_percentage().