ClickHouse/base/base/getMemoryAmount.h
Robert Schulze 4e12b5dc91
Some fixups
2024-03-13 16:54:20 +00:00

12 lines
451 B
C++

#pragma once
#include <cstdint>
/// Returns the size in bytes of physical memory (RAM) available to the process. The value can
/// be smaller than the total available RAM available to the system due to cgroups settings.
/// Returns 0 on unsupported platform or if it cannot determine the size of physical memory.
uint64_t getMemoryAmountOrZero();
/// Throws exception if it cannot determine the size of physical memory.
uint64_t getMemoryAmount();