/* johnmcm.com: Emscripten has no sysinfo(), which 7-Zip's Linux build calls * (CPP/Windows/System.cpp) to size its buffers from the machine's memory. * This reports 2 GB of RAM, half of WebAssembly's 4 GB ceiling, and nothing * else. Public domain. */ #include #include int sysinfo(struct sysinfo *info) { memset(info, 0, sizeof(*info)); info->totalram = 2048UL * 1024 * 1024; info->freeram = info->totalram; info->mem_unit = 1; info->procs = 1; return 0; }