linuxkpi: Add freeram and freehigh to struct sysinfo

The struct layout is modified with this commit because new fields are
added in the middle, keeping original Linux order.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D37932
This commit is contained in:
Jean-Sébastien Pédron 2023-01-02 21:57:35 +01:00
parent bcad3f96ae
commit e400b69599
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC
2 changed files with 7 additions and 3 deletions

View File

@ -144,9 +144,11 @@ struct vm_operations_struct {
};
struct sysinfo {
uint64_t totalram;
uint64_t totalhigh;
uint32_t mem_unit;
uint64_t totalram; /* Total usable main memory size */
uint64_t freeram; /* Available memory size */
uint64_t totalhigh; /* Total high memory size */
uint64_t freehigh; /* Available high memory size */
uint32_t mem_unit; /* Memory unit size in bytes */
};
/*

View File

@ -79,7 +79,9 @@ void
si_meminfo(struct sysinfo *si)
{
si->totalram = physmem;
si->freeram = vm_free_count();
si->totalhigh = 0;
si->freehigh = 0;
si->mem_unit = PAGE_SIZE;
}