cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH 2/4] src/mkhelp: use stack allocation instead of heap for line buffer

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 6 May 2013 20:38:18 +0200

On Mon, May 06, 2013 at 02:19:49PM -0400, Dave Reisner wrote:
> void hugehelp(void)
> {
> - unsigned char* buf;
> + unsigned char buf[BUF_SIZE];
> int status,headerlen;
> z_stream z;

IIRC, this particular code used to allocate the buffer on the stack, and was
changed to malloc when problems arose on one of the BSDs, I think, which had a
64 KiB stack limit by default.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-06