diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-12 21:49:20 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-12 22:02:13 -0400 |
commit | 9a652bf4cfc943a5a59d23ea19c1efb202af5286 (patch) | |
tree | e30fffa19143440da0d60cbbe8c5c741bdb483bf /sys/include | |
parent | feab44d461465f19a8fda7250a422ff75fef3929 (diff) |
kernel: vm: Add total system memory in vmstat
This commit introduces reporting of total system memory supported
through the vmstat subsystem
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/vmstat.h | 2 | ||||
-rw-r--r-- | sys/include/vm/physmem.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sys/include/sys/vmstat.h b/sys/include/sys/vmstat.h index 127bc96..b7faeb2 100644 --- a/sys/include/sys/vmstat.h +++ b/sys/include/sys/vmstat.h @@ -37,10 +37,12 @@ * * @mem_avail: Available memory in MiB * @mem_used: Allocated memory in MiB + * @mem_total: Total system memory in MiB */ struct vm_stat { uint32_t mem_avail; uint32_t mem_used; + size_t mem_total; }; #endif /* !_VM_STAT_H_ */ diff --git a/sys/include/vm/physmem.h b/sys/include/vm/physmem.h index e16bcf9..3f1da61 100644 --- a/sys/include/vm/physmem.h +++ b/sys/include/vm/physmem.h @@ -34,6 +34,7 @@ uint32_t vm_mem_used(void); uint32_t vm_mem_free(void); +size_t vm_mem_total(void); void vm_physmem_init(void); uintptr_t vm_alloc_frame(size_t count); |