On Mon, Feb 28, 2011 at 07:28, Alan Wolfe <[email protected]> wrote:
> > Basically, it allocates a single byte so there's a valid memory > address in chunk.memory so that realloc can be called on it later on. > If it started out NULL, there would have to be an if check before the > realloc call, so it just simplifies things a little. Just to pre-answer a question people may ask.. realloc(NULL) works fine on many architectures. But not on all architectures. To be perfectly portable we use the malloc(1) trick. -Tor ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
