Perhaps then a scheme in which the compiler 1) compresses all tree structures (this would be a good project) 2) after each pass, all internal structures are freed unless doing so would create a dead pointer (maybe an -Om option like -Os but saves compilation memory?) 3) dosen't use memory in general, i.e do things like int i; for (i = 0; i != n_something; i++) putc(getc(fp), ofp);
instead of things like pointer_to_something = malloc(n_something * sizeof(int)); fgets(n_something, pointer_to_something, fp); fputs(pointer_to_something, ofp); 4) use less memory-intensive alogrithms and investigate using more memory-efficent repersentations Samuel Lauber > > > > I know that Bohem's GC is used in the Java runtime for GCC. > > > > However, the compiler proper itself can _really_ cramp people's > > > > avalible RAM (for those who don't belive me and have Windows w/ > > > > DJGPP, change all the memory controls from `auto' to the highest > > > > value and just try to compile libiberty/regex.c), so my suggestion > > > > is usage of Bohem's GC in the compiler proper itself. > > > > > > Do you have any reason to believe that such a change would reduce > > > memory consumption? > > > > I should note this is a loaded question, because anyone who has > > actually tried using boehm's gc with gcc will tell you the memory > > usage actually increases, not decreases. > > > > It's almost as if conservative mark and sweep is not going to work > > as well as accurate mark and sweep. > > Astonshing, isn't it? :-) > > To be fair to the Boehm gc, though: it isn't inherently a conservative > collector, but will also do precise gc. > > Andrew. -- _____________________________________________________________ Web-based SMS services available at http://www.operamail.com. From your mailbox to local or overseas cell phones. Powered by Outblaze