struct meminfo { uint64_t phys_total; uint64_t phys_avail; uint64_t phys_free; uint64_t shared_usage; uint64_t kernel_usage; uint64_t table_usage; uint64_t poison_usage; } __attribute__((packed)); int meminfo(struct meminfo *addr);
This syscall writes memory usage information to the passed structure.
The values stand for:
phys_total: Total physical memory present in the system.
phys_avail: Total physical memory available for OS use in the system.
phys_free: Of the available physical memory, how much is not used.
shared_usage: Memory used in shared memory segments.
kernel_usage: Memory used by the kernel.
table_usage: Memory used in the effort of keeping track of memory.
poison_usage: Physical memory denied by memory poisoning, and other
error-correcting and mitigating measures.
The syscall returns 0 on success or -1 on failure, with the
following errno:
EFAULT: The struct pointed to by addr is not accessible.