This content has been marked as final. Show 5 replies
Are you using plain Studio 12? Have you tried a more recent version (one of updates 1 to 3)?
It looks like only about 2 GB was allocated
before virtual memory ran out.
I think it should be able to allocate closer
to 3.5 GB of heap memory.
Perhaps you need more physical memory or swap,
or perhaps something else was consuming memory too.
Generally speaking, making your source files smaller
(less functions, less lines of code, less initialized data)
by splitting larger files into multiple smaller ones
will tend to help the compiler use less memory.
Also, the advice about moving to a newer compiler may help.
Thanks for the quick reply. Is there any way I can check which version I have. I am sorry, I dont know how to check the version of Sun Studio.
This is what I get when I execute the cc compiler version:
cc: Sun C 5.9 SunOS_sparc Patch 124867-11 2009/04/30
1) The machine has huge amount of memory, ~32 GB of physical memory installed, 30GB free.
e.g. top command output:
Memory: 32G real, 30G free, 524M swap in use, 34G swap free
So does not look like a memory config issue.
2) I will update the Sun Studio to update 3 (12.3) and try again.
Thank you all for all your suggestions.
If the build failure is holding you up from going forward, you could compile just this file without optimization while continuing to optimize other files. Then in the background, you could try to modify the function(s) in the file to make them smaller and try again.