diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-08 11:37:01 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-08 11:40:58 +0100 |
commit | fdbd9f1e272b97d7d28f9f610be8fbf0bdbd98d9 (patch) | |
tree | 5caafbf80252f8116a6921d7498d5d56a21481fb /LibC/stdlib.cpp | |
parent | 41a751c90c9d39db764308aeba476db593b9b6e1 (diff) | |
download | serenity-fdbd9f1e272b97d7d28f9f610be8fbf0bdbd98d9.zip |
Start working on memory-mapped files.
First of all, change sys$mmap to take a struct SC_mmap_params since our
sycsall calling convention can't handle more than 3 arguments.
This exposed a bug in Syscall::invoke() needing to use clobber lists.
It was a bit confusing to debug. :^)
Diffstat (limited to 'LibC/stdlib.cpp')
-rw-r--r-- | LibC/stdlib.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LibC/stdlib.cpp b/LibC/stdlib.cpp index fa6c91fb4c..342ab92e2f 100644 --- a/LibC/stdlib.cpp +++ b/LibC/stdlib.cpp @@ -18,7 +18,7 @@ static byte* endptr = nullptr; void __malloc_init() { - nextptr = (byte*)mmap(nullptr, mallocBudget); + nextptr = (byte*)mmap(nullptr, mallocBudget, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); endptr = nextptr + mallocBudget; int rc = set_mmap_name(nextptr, mallocBudget, "malloc"); if (rc < 0) |