Kernel/LibC: add mmap for private anonymous mappings

This will be used by the userspace to get more memory. Currently
kernel handles all allocations, which is not preferable.
This commit is contained in:
2023-09-22 15:41:05 +03:00
parent b9c779ff7e
commit af4af1cae9
7 changed files with 117 additions and 0 deletions

View File

@@ -194,6 +194,12 @@ namespace Kernel
case SYS_SYNC:
ret = Process::current().sys_sync();
break;
case SYS_MMAP:
ret = Process::current().sys_mmap(*(const sys_mmap_t*)arg1);
break;
case SYS_MUNMAP:
ret = Process::current().sys_munmap((void*)arg1, (size_t)arg2);
break;
default:
dwarnln("Unknown syscall {}", syscall);
break;