draconisplusplus/src/os/macos.cpp

12 lines
188 B
C++
Raw Normal View History

2024-05-29 00:28:54 -04:00
#include "os.h"
#include <sys/sysctl.h>
uint64_t get_meminfo() {
uint64_t mem = 0;
size_t size = sizeof(mem);
sysctlbyname("hw.memsize", &mem, &size, nullptr, 0);
return mem;
}