aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/mem.c
blob: 0b7e8065ef9c076144ea2b8035d53813553fd509 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com

/// Functions for accessing system memory information.

#include <stdint.h>
#include <uv.h>

#include "nvim/os/os.h"

/// Get the total system physical memory in KiB.
uint64_t os_get_total_mem_kib(void)
{
  // Convert bytes to KiB.
  return uv_get_total_memory() / 1024;
}