Virtual memory exhausted problems when bootstraping on OSF v 4.0 +workaround.

Gareth Pearce tilps@hotmail.com
Thu Feb 21 23:11:00 GMT 2002


Hi

I noticed a report or 2 of 'virtual memory exhausted' while
bootstraping gcc.

I get the same - on different files.  when bootstraping both HEAD and
3.0 branch on OSF 4.0d - using gcc 3.0.3 which was bootstraped from a 
previous install of 3.0.3 which was bootstraped from local compiler.

both manage to compile xgcc stage1 - but fail compiling stage2.

all evidence points to the fact that virtual memory is not exhausted at all. 
  but that there is a bug/missuse of mmap somehow.  If I disable mmap after 
configure by commenting out the mmap anonymous and mmap dev/zero defines in 
auto-host.h - everything compiles perfectly.

I wrote a simple test program which looped mmap anonymous calls allocating 
10k and writing to a random spot in the allocated memory.
This successfully allocated 1gig ram and 500meg resident (guess 4k pages or 
something) - without returning error.
However if I watch top during bootstrap - memory usage for the compiler 
doesnt get over 50meg ... and when i added a debuging statement to print out 
how much it was trying to allocate when failed - it was about 128k ...
So - I am not sure exactly what is causing it to die ... but prehaps i need 
to munmap stuff as well in my testcase.

If some more debuging would be helpful - I should be able to manage it, but 
I am not sure where to go from here.

Aditional information  gcc 3.0.3 which i am using to bootstrap (but wont be 
once this compile finishes) - itself has failed with virtual memory 
exhausted - trying to compile mozilla.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.



More information about the Gcc-bugs mailing list