RFC: Make is a HUGE memory hog

Paolo Bonzini bonzini@gnu.org
Tue Dec 13 09:36:00 GMT 2005


> GNU make 3.80 is a HUGE memory hog. It calls xstrdup to build
> dependency list. gnu-src-gcc.deps in libjava has 3000+ targets depend
> the same 3000+ files, whose filenames are more than 260K. For this
> dependency alone, make takes 3000*260K == 761MB.

Then, you should make the 3000+ target depend on the same stamp file, 
and touch the stamp file whenever one of the 3000+ files are changed. 
These would make 6000 dependencies, not 3000^2 = 9 million (which is not 
going to be that efficient anyway).

Also, GNU make is not released that often, and it does not seem 
plausible that we require a CVS make to build libjava on a machine with 
<1 GB.

Paolo



More information about the Gcc mailing list