3 ms·
Making every C call a system call is not a good idea at all - think about malloc() etc - the OS shouldn’t care about individual allocations and only worry abou
by alfiedotwtf 5mo ago
Making every C call a system call is not a good idea at all - think about malloc() etc - the OS shouldn’t care about individual allocations and only worry about providing brk() etc. otherwise, performance will die if you’re doing a thousand system calls per second!
- HexDecOctBin 5mo agoNo modern libc uses (or should use) brk() as the heap. Allocate virtual memory using mmap, VirtualAlloc, etc., and manage your set of heaps.
- thayne 5mo agoI believe glibc uses both mmap and brk depending on the situation.
- zzo38computer 5mo agoIt is not what I meant and also seems to me not what is meant by sp.h either.