Operating System - HP-UX
1751865 Members
5789 Online
108782 Solutions
New Discussion юеВ

gcc compile error: out of memory

 
SOLVED
Go to solution
Figo_1
Occasional Advisor

gcc compile error: out of memory

Hi
i try to build a test program on HPUX,
it happen to get this error message

cc1: out of memory allocating 2489608 bytes after a total of 267205368 bytes
make: *** [mytest] Error 1


bash-3.2# uname -a
HP-UX mars B.11.11 U 9000/785 2003131410 unlimited-user license
bash-3.2# gcc -dumpversion
3.3.3
bash-3.2# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
reserve - 183992 -183992
memory 1573028 1149212 423816 73%

any help? many thanks!!
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: gcc compile error: out of memory

>i try to build a test program on HP-UX

(It must be a pretty big test.)

You need to increase maxdsiz with kmtune(1m). You probably have it at 256 Mb and you need to make it bigger. Make sure maxdsiz_64bit is larger than maxdsiz.

>swapinfo

This is near useless, you need to provide the "swapinfo -tam" output.
Figo_1
Occasional Advisor

Re: gcc compile error: out of memory

yes, that is right, i check maxdsiz and it is equivalent to 256M

bash-3.2# kmtune | grep maxdsiz
maxdsiz 0x10000000 - 0x1000000
maxdsiz_64bit 0x40000000 - 0x4000000

i follow Dennis's suggestion, modify maxdsiz to 0x40000000 while maxdsiz_64bit to 0x80000000, the error message disappeared and my test program build normally.

thx for Dennis's help
Figo_1
Occasional Advisor

Re: gcc compile error: out of memory

[solved]