I would like to know in kernel source version >= 2.6 where brk
is defined. That is which c file contains its definition? grep
is not revealing much. Also sbrk
is implemented in glibc correct?
Asked
Active
Viewed 575 times
0

Matthew Hoggan
- 7,402
- 16
- 75
- 140
1 Answers
1
It's in mmap.c
. Look for:
SYSCALL_DEFINE1(brk, unsigned long, brk)
The manual page says:
On Linux, sbrk() is implemented as a library function that uses the brk() system call, and does some internal bookkeeping so that it can return the old break value.

cnicutar
- 178,505
- 25
- 365
- 392