cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PATH_MAX

From: James Housley <jim_at_thehousleys.net>
Date: Mon, 18 Jun 2007 10:43:21 -0400

On Jun 18, 2007, at 7:14 AM, Daniel Stenberg wrote:

> Hi James,
>
> The PATH_MAX usage in lib/urldata.h still breaks builds and I
> hesitate to release until we have this sorted.
>
> Also, I've taken a look at this and I think we should reconsider
> the use of this define:
>
> It is by default set to 4096 on many systems, and having two
> variables of that size by default in a struct is needlessly gonna
> add some 8K of memory use for every single connection (for libcurls
> with SSH-capabilities enabled). I think we should rather malloc-on-
> demand instead.
>
> I think the asprintf() function should come handy for this.

asprintf() is not used anywhere. How portable is it, and what
configure changes would be needed. Personally I really like asprintf().

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
                      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
A: Yes.
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?
Received on 2007-06-18