diff options
author | dzwdz | 2022-05-26 21:45:34 +0200 |
---|---|---|
committer | dzwdz | 2022-05-26 21:45:34 +0200 |
commit | 2dfecbfa898c7db2f5039c81c23a8475966ecfef (patch) | |
tree | 74d809b4315f49070c1e780355abdcc909294172 /src/shared/syscalls.h | |
parent | 0604552310847fd695e9cf62fcddb8e18720fc3b (diff) |
syscalls/memflag: FINDFREE flag
Diffstat (limited to 'src/shared/syscalls.h')
-rw-r--r-- | src/shared/syscalls.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h index 8dee783..5d98429 100644 --- a/src/shared/syscalls.h +++ b/src/shared/syscalls.h @@ -66,4 +66,13 @@ struct fs_wait_response { int _syscall_fs_wait(char __user *buf, int max_len, struct fs_wait_response __user *res); int _syscall_fs_respond(char __user *buf, int ret); -int _syscall_memflag(void __user *addr, size_t len, int flags); +/** Modifies the virtual address space. + * + * If the MEMFLAG_PRESENT flag is present - mark the memory region as allocated. + * Otherwise, free it. + * + * MEMFLAG_FINDFREE tries to find the first free region of length `len`. + * + * @return address of the first affected page (usually == addr) + */ +void __user *_syscall_memflag(void __user *addr, size_t len, int flags); |