Termsslug: brk-syscall

brk syscall

brk 系统调用

Linux syscall that queries and grows the process heap break address.

Curated Intelligence

1 items · Page 1/1
Hacker News AIT2·Tools
38 pts
How malloc Really Works Under the Hood

Using glibc and strace, the author traces 1000 malloc(16) calls and finds only two brk syscalls, with the heap grown once by 132 KiB and the rest served from that pool. An empty syscall costs about 575 ns, explaining why user-space allocators batch kernel requests and do bookkeeping locally.