[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Increase "Safety factor" when ARG_MAX is less than 40KB.

From: Peter O'Gorman
Subject: Re: [PATCH] Increase "Safety factor" when ARG_MAX is less than 40KB.
Date: Tue, 02 Sep 2008 11:58:15 -0500
User-agent: Thunderbird (X11/20080501)

Ralf Wildenhues wrote:
> Hi Peter,
> * Peter O'Gorman wrote on Tue, Sep 02, 2008 at 05:50:33PM CEST:
>> On an hpux10.20 system with ARG_MAX at 20KB, we still got "Arg list too
>> long" when linking. It worked when I edited the libtool script and set
>> max_cmd_len to 10K instead of 15.
>> For systems with a large value of ARG_MAX, setting max_cmd_len to 75%
>> still seems reasonable though.
>> Ok to push?
> There is little reason to believe that the number of arguments that the
> C++ driver adds, plus the size of the environment, scales linearly with
> ARG_MAX[1].  So why not subtract a reasonable constant amount in the
> first place?

I was also thinking of something like (pseudocode):

if ARG_MAX > 80K
  max_cmd_len=ARG_MAX - 40K
  max_cmd_len=ARG_MAX / 2

Because you're right, we may be penalizing systems with large ARG_MAX
unnecessarily. The problem is that you have to make up the constants
etc, and I was attempting to follow what had been done previously (in
old libtools max_cmd_len was set to 50% of the calculated value, it was
changed to 75% along with the patch to use getconf ARG_MAX, iirc).

Anyway, what formula do you think reasonable?

Peter O'Gorman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]