shecc icon indicating copy to clipboard operation
shecc copied to clipboard

libc: Drop brk in favor of mmap inside malloc/free

Open jserv opened this issue 5 years ago • 0 comments

At present, malloc was implemented via brk system call, which is obsolete. Most malloc implementations use mmap system call instead. We shall drop the use of brk in favor of mmap while implementing maloc and free.

Check comprehensive list for system calls via https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md#cross_arch-numbers

#define __syscall_mmap 192
#define __syscall_munmap 91

jserv avatar Oct 25 '20 16:10 jserv