Mail Archives: djgpp/1997/11/14/07:46:17
> But I have yet to see a C library that doesn't have `sbrk'. I think
> you can pretty much count on it.
ACK! What terrible advice! A large fraction (about 30%) of the C compiler/
OS combinations I have had to work with over the last 6 years either don't
support sbrk(), have a broken implementation (fun to find), or use of the
function completely breaks something in some other library routine.
Code for malloc, with a potential ifdef to use sbrk() if it's available
and fully tested, and you really need it. So far, the only reason I know
of to use sbrk() is when the default malloc is really badly broken in some
manner...
- Raw text -