This is the mail archive of the 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

> The recent discussion about ggc-min-heapsize and ggc-min-expand here:
> inspired me to write something to dynamically choose default values
> depending on the total physical memory size.
> I think this approach is better than simply raising the value, since
> it avoids hosing smaller boxes.  It's also better IMHO than an
> adaptive algorithm based on available RAM or page faults in that this
> way it is deterministic.  (At least it is for a given amount of RAM.)

> 2003-02-12  Kaveh R. Ghazi  <>
> gcc:
> 	* (ggc-common.o): Depend on $(PARAMS_H)
> 	* ggc-common.c: Include params.h
> 	(ggc_min_expand_heuristic, ggc_min_heapsize_heuristic,
> 	init_ggc_heuristics): New functions.
> 	* ggc.h (ggc_min_expand_heuristic, ggc_min_heapsize_heuristic,
> 	init_ggc_heuristics): Prototype.
> 	* toplev.c (parse_options_and_default_flags): Call
> 	init_ggc_heuristics.
> include:
> 	* libiberty.h (physmem_total, physmem_available): Prototype.
> libiberty:
> 	* (CFILES): Add physmem.c.
> 	(REQUIRED_OFILES): Add physmem.o.
> 	* Check for sys/pstat.h.
> 	(checkfuncs): Add pstat_getstatic and pstat_getdynamic.
> 	* physmem.c: New file, copied from textutils.
> 	*, configure: Regenerated.

Wouldn't it make sense for the "gcc" driver program to determine these 
values and pass them in as parameters to cc1?  Then compilations would be 
repeatable across multiple machines since -v would show us what values 
were in use.


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