neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

mem.c (273B)


      1 /// Functions for accessing system memory information.
      2 
      3 #include <stdint.h>
      4 #include <uv.h>
      5 
      6 #include "nvim/os/os.h"
      7 
      8 /// Get the total system physical memory in KiB.
      9 uint64_t os_get_total_mem_kib(void)
     10 {
     11  // Convert bytes to KiB.
     12  return uv_get_total_memory() / 1024;
     13 }