* Peter O'Gorman wrote on Tue, Sep 02, 2008 at 06:58:15PM CEST: > > I was also thinking of something like (pseudocode): > > if ARG_MAX > 80K > max_cmd_len=ARG_MAX - 40K > else > max_cmd_len=ARG_MAX / 2 > endif
Sounds not so unreasonable. > 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? For starters, how large is the environment and how large is the driver overhead, in the case where you're hitting the wall? Cheers, Ralf
