That's most probably why he wrote: "on any system that supplies sbrk"
If you muck around with sbrk, you may break your malloc implementation, so your
malloc should replace it completely.
The malloc implementation in glibc is defensively coded against this. It will
notice that someone has moved the break location behind its back. After that,
it will continue to work, but it will not be able to return memory to the
operating system when the program calls free (at least not from the principal
heap). This is a lucky case. Another malloc implementation might simply not
bother to check whether sbrk has moved. Once you use brk or sbrk, you can't
use malloc. Your allocator should provide a complete replacement which is used
by everything in the address space.
Any halfway sane do-it-yourself allocator targetting Unix uses anonymous mmap
for grabbing memory.
Now the above are just my hacker intuitions. But what does the Single Unix
Specification actually say? What do you know. It denotes these functions as
legacy interfaces. As in, obsolete junk. Do not use. And---aha!---there is
this text:
The behaviour of brk() and sbrk() is unspecified if an application
also uses any other memory functions (such as malloc(), mmap(),
free()). Other functions may use these other memory functions silently.
There you go.