This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Patch: RAM-based heuristics for ggc-min-heapsize and ggc-min-expand


 > From: Richard Earnshaw <rearnsha@arm.com>
 > 
 > > Richard Earnshaw wants me to put the heuristics in gcc.c and pass it
 > > to cc1 (et al) via specs using -param commands.  This has the
 > > advantage in that bug reports with the output of gcc -v testcase.c
 > > will show the memory heuristics used also, in case that is relevant to
 > > triggering the bug.
 > > http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01011.html
 > > 
 > 
 > I will withdraw my objection if you can guarantee that specifying memory 
 > limits on the command line rather than using inbuilt heuristics will 
 > guarantee not to alter the address at which any data object is allocated.  
 > The guarantee must hold for all host platforms.
 > 
 > I suspect that in order to do this you must in effect run the heuristic 
 > (it might somehow end up calling malloc) and then discard the result if 
 > the command line overrides it.

If I understand you correctly, that's exactly what happens in the
original patch.  I.e. the heuristic value is calculated when cc1
initializes itself and setup right before argument processing.  If the
appropriate -param argument was supplied, the heuristic value is
discarded and the user's value is substituted.

Sound ok?

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]