3 ms·
>There's no malloc system call. Thats not really true. Not all dynamic allocation schemes rely on mmap, some use the brk and sbrk system calls. "In the origin
by voidlogic 12y ago
>There's no malloc system call.
Thats not really true. Not all dynamic allocation schemes rely on mmap, some use the brk and sbrk system calls.
"In the original Unix system, brk and sbrk were the only ways in which applications could acquire additional data space; later versions allowed this to also be done using the mmap call." -https://en.wikipedia.org/wiki/Sbrk https://en.wikipedia.org/wiki/Sbrk
Also mmap itself is also a system call, it usually just was called prior to the failing page allocation, not at the time of allocation failure.