mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 19:28:29 +00:00
Fix sysinfo() totalram on XNU
HW_MEMSIZE is the 64-bit version of HW_PHYSMEM, which is inaccurate on systems having more than 4gb of RAM.
This commit is contained in:
parent
0da47c51de
commit
5a3c646307
3 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,8 @@ struct sysinfo {
|
|||
uint64_t totalswap; /* size of emergency memory */
|
||||
uint64_t freeswap; /* hopefully equal to totalswap */
|
||||
int16_t procs; /* number of processes */
|
||||
int16_t __ignore; /* padding */
|
||||
int16_t __ignore1; /* padding */
|
||||
int32_t __ignore2; /* padding */
|
||||
uint64_t totalhigh; /* wut */
|
||||
uint64_t freehigh; /* wut */
|
||||
uint32_t mem_unit; /* ram stuff above is multiples of this */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue