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


> "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
> 
> >  > From: Zack Weinberg <zack@codesourcery.com>
> >  > 
> >  > We should take rlimits into account in the heuristics.
> >  > zw
> >
> > How?  Which one?
> 
> RLIMIT_RSS is the obvious one - that's the limit on resident set size,
> i.e. the OS will start paging us if we exceed it.  I'd suggest taking
> the minimum of that and the actual physical memory size as the input
> to the heuristic.

RLIMIT_RSS would certainly be better than physical memory if it is lower.  
Consider that we have x86 machines with 8G of RAM, though clearly a single 
process can't access more than 4G (and probably less, since the OS has to 
be mapped in somewhere).

> 
> It doesn't make sense for us to try to consider RLIMIT_DATA etc, since
> we don't have enough control to guarantee that we don't go over those.
> 

RLIMIT_DATA would be completely wrong anyway.  That's the maximum virtual 
data size (including swapped out data).  If the compiler exceeds that then 
it's just going to get killed by the OS.

R.


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