cURL / Mailing Lists / curl-library / Single Mail

curl-library

stack overflow

From: T. Bharath <TBharath_at_responsenetworks.com>
Date: Tue, 11 Sep 2001 02:08:10 -0400

Hi Daniel
The curllib uses large stack based buffers some of even 8k size.Now the
advantage is that we dont need to worry about deallocating them and no
memory leaks
But there is seems to be a side effect when the curlib is used in an exe
with say around 15 dlls with about 20 threads running and atleast 10
active any time
The moment control goes into the curllib a stackoverflow exception is
thrown.
I had faced the same problem with an earlier version ,i think 7.4 and i
had reported it .The reason the exception is thrown is the allocation
exceeds the default stack limit of 1 MB.One way to counter this to
increase the default stack limit.But the sideeffect is increased
runtime footprint.Do you think
Curl should use heapbased buffers and not stackbuffers

Regards
Bharath
Received on 2001-09-11