bug-make
[Top][All Lists]
Advanced

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

Re: PATCH: stack overflow on large dependency set


From: Paul D. Smith
Subject: Re: PATCH: stack overflow on large dependency set
Date: Wed, 9 Oct 2002 11:06:45 -0400

%% Wil Evers <address@hidden> writes:
 
  >> I don't think I'll use this exact patch, since putting 0x30000
  >> chars on the stack doesn't seem like a good idea... plus the chance
  >> that a rule needs 0x10000 chars for its prerequisites list seems
  >> very small to me.

  we> Well, the exact amount allocated on the stack is easily
  we> configurable by the three #defines I added to the top of the file.

Indeed.

  we> The idea is not to use the heap if we don't have to.

Using the heap, per se, is not a problem.  The reason to use alloca() is
that calling malloc(), free() etc. involves performance overhead, plus
alloca() is a little easier/safer to program with in some circumstances
(you don't have to remember to free(), especially if you have multiple
exit points from your function, you don't have to keep a pointer to the
start of the memory block, etc.)

  >> But I'll do something so that this function doesn't use alloca() and
  >> fail with large prerequisite lists.

  we> The ability to have a file depend on a lot of other files may be
  we> important to some; all I can say is I'm sure it's important to me.

Yes; as I said I'll fix this so it does not fail with large prerequisite
lists.  GNU make, like all GNU tools, aims to be limited only by system
capabilities and not impose any internal size restrictions.

Thanks.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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