cURL / Mailing Lists / curl-library / Single Mail


Re: stack overflow

From: Daniel Stenberg <>
Date: Tue, 11 Sep 2001 08:32:46 +0200 (MET DST)

On Tue, 11 Sep 2001, T. Bharath wrote:

> 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

It is also usually much faster. Do you have any profiling data that points to
where the biggest sinners are? I mean which functions.

> Do you think Curl should use heapbased buffers and not stackbuffers

I think curl should use a malloc() to alloc memory chunks that are "large".
Only "small" memory buffers should be stack based.

    Daniel Stenberg -- curl groks URLs --
Received on 2001-09-11