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:
parent
bcad3f96ae
commit
e400b69599
@ -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 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user