curl-library
Re: thread stack size
Date: Sat, 20 Mar 2004 18:19:38 -0800
On Sat, Mar 20, 2004 at 12:08:47PM +0100, Jean-Yves Lefort wrote:
> Hi,
>
> In lib/content_encoding.c, a 64k stack buffer is used. On some
> platforms, the default thread stack size is too small to hold that
> buffer. To use libcurl in a multi-threaded program, the programmer has
> to manually specify a thread stack size.
>
> You should explicitly state the required stack size in the documentation
> and/or define some CURL_NEEDED_STACK_SIZE constant.
>
> This issue might be the cause of the BSD problem reports mentioned in
> http://curl.haxx.se/libcurl/threadsafe.html. For instance, FreeBSD has a
> 64k default thread stack size.
I wasn't very happy about the need for that big buffer, either. Putting it
onto the heap just opens the door to garbage being created since there
doesn't seem to be a guaranteed way to clean up if a transfer aborts. There
already is a problem with that in the current code.
The 1.2 release of zlib now contains native gzip decompression code that looks
like it can eliminate both problems at once. That code ought to be rewritten
to use 1.2 (if available) so those for which this is an issue have a way
around it.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has moved
- application/pgp-signature attachment: stored