aboutsummaryrefslogtreecommitdiff
path: root/src/os.c
blob: c61259dd55e89c4467f858b74a8d031e1d603938 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* vi:set ts=8 sts=4 sw=4:
 *
 * VIM - Vi IMproved	by Bram Moolenaar
 *
 * Do ":help uganda"  in Vim to read copying and usage conditions.
 * Do ":help credits" in Vim to see a list of people who contributed.
 * See README.txt for an overview of the Vim source code.
 */

/*
 * os.c -- OS-level calls to query hardware, etc.
 */

#include "vim.h"

#include "uv.h"

/*
 * Return total amount of memory available in Kbyte.
 * Doesn't change when memory has been allocated.
 */
long_u mch_total_mem(int special)
{
  /* We need to return memory in *Kbytes* but uv_get_total_memory() returns the
   * number of bytes of total memory. */
  return uv_get_total_memory() >> 10;
}