aboutsummaryrefslogtreecommitdiff
path: root/src/os/mem.c
blob: b4335fd17931d438673f8564fe0f1861ef6be4ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// os.c -- OS-level calls to query hardware, etc.

#include <uv.h>

#include "os/os.h"

// Return total amount of memory available in Kbyte.
// Doesn't change when memory has been allocated.
long_u os_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;
}