Files
neovim/src/os/mem.c
Thomas Wienecke 4e29a820b6 Address clint warnings and other style issues.
* Add const.
* Fix conditions (move && from end to start of line).
* Use int32_t instead of long.
* Use //-style comments.
2014-03-27 19:57:55 -03:00

14 lines
384 B
C

// 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;
}