From b8284137d4e0eec11c78bc14047243fce6a51373 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 6 Sep 2020 15:47:06 -0400 Subject: minor changes, redoing makefile, meminfo program --- src/user/meminfo/meminfo.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/user/meminfo/meminfo.c (limited to 'src/user/meminfo') diff --git a/src/user/meminfo/meminfo.c b/src/user/meminfo/meminfo.c new file mode 100644 index 0000000..dd1d371 --- /dev/null +++ b/src/user/meminfo/meminfo.c @@ -0,0 +1,19 @@ +#include +#include +#include + +void main() { + char nbuf[11]; + + tell_user_sz("Kernel dynamic memory remaining: "); + + itosz(_kernel_dynamic_area_left() * 4, nbuf); + tell_user_sz(nbuf); + tell_user_sz("k\n"); + + tell_user_sz("Userspace memory remaining: "); + + itosz(_total_userspace_left() * 4, nbuf); + tell_user_sz(nbuf); + tell_user_sz("k\n"); +} \ No newline at end of file -- cgit v1.2.3