From 334c6a6439b208573ec20772179fdcc6e888bd3c Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 17 Mar 2019 18:04:06 -0500 Subject: [PATCH] Fix syscall memory allocation bug --- libc/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/memory.c b/libc/memory.c index b66ef2b..a692e8b 100644 --- a/libc/memory.c +++ b/libc/memory.c @@ -12,7 +12,7 @@ void* alloc_memory(uint32_t num_pages) { void alloc_memory_virt(uint32_t num_pages,void* addr) { void* address; asm volatile(" \ - mov $3, %%eax; \ + mov $4, %%eax; \ int $80; \ "::"b"(num_pages),"c"(addr)); }