mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 08:35:26 +00:00
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. :^)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user