Kernel: Expose /proc/meminfo and fix /proc/<pid>/meminfo

Thread was unconditionally calling <stack>->size() without validating
that the stack actually exists
This commit is contained in:
2024-08-09 15:50:50 +03:00
parent 2a659a9d03
commit 44f0ec601f
5 changed files with 95 additions and 21 deletions

View File

@@ -24,6 +24,13 @@ struct proc_meminfo_t
size_t phys_pages;
};
struct full_meminfo_t
{
size_t page_size;
size_t free_pages;
size_t used_pages;
};
/*
fildes: refers to valid tty device
command: one of TTY_CMD_* definitions