Comment by fjfaase

24 days ago

The sbrk system call in linux is still available to get more heap from the operating system. So, memory is still allocated in a linear fasion and never released again. Maybe now functions like mmap change this. I used sbrk to implement malloc for a very limited standard libary implementation.

sbrk has been obsolete for almost three decades. mmap is almost always the way memory is allocated from the kernel.