Kernel: Add basic fixed width allocator for userspace

We have to move process stacks to the general heap and maybe map
kernel to higher half.
This commit is contained in:
2023-05-06 18:10:38 +03:00
parent b65cd1d09b
commit ff5bcd4416
10 changed files with 267 additions and 9 deletions

View File

@@ -68,6 +68,12 @@ long syscall(long syscall, ...)
ret = Kernel::syscall(SYS_OPEN, path, oflags);
break;
}
case SYS_ALLOC:
{
size_t bytes = va_arg(args, size_t);
ret = Kernel::syscall(SYS_ALLOC, bytes);
break;
}
default:
puts("LibC: Unhandeled syscall");
}