Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Out of Memory error while compiling on HP-UX B.11.00

 
Highlighted

Out of Memory error while compiling on HP-UX B.11.00

Hi,

While compiling my c++ application on B.11.00, I am getting following error:
Error 6355: Exact position unknown; near ["Files.cpp", line 1244]. # [line 0 Files::FileList()] Out of memory.
Check kernel maxdsiz parameter and swap space configured. (6355)

Files::FileList() is the newly added function and I am getting above error if i add this function to my file.
The file has around 1400 lines (after adding new functions)

output of kmtune for maxdsiz value:

#kmtune | grep maxdsiz
maxdsiz 0x040000000
maxdsiz_64bit 0x0000000040000000


Can anybody help me in resolving this?

-Mrunal
10 REPLIES 10
Highlighted
Acclaimed Contributor

Re: Out of Memory error while compiling on HP-UX B.11.00

What version of the aC++ are you using?

>The file has around 1400 lines

How many lines if you count include files? Compile with "-E -.i" and count lines in the .i file.

>maxdsiz 0x40000000
>Can anybody help me in resolving this?

You are at 1 Gb, nothing can be done except split up the source or drop the opt level.
Highlighted

Re: Out of Memory error while compiling on HP-UX B.11.00

acc version is
# aCC -V
aCC: HP ANSI C++ B3910B A.03.45


around 1950 lines in total..
Highlighted
Acclaimed Contributor

Re: Out of Memory error while compiling on HP-UX B.11.00

>A.03.45

This is very old. The last version was A.03.55, 2004

>around 1950 lines in total.

That seems pretty small. What opt level? And do you have enough swapspace when you were compiling?
Highlighted

Re: Out of Memory error while compiling on HP-UX B.11.00

# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 524288 18920 505368 4% 0 - 1 /dev/vg00/lvol2
reserve - 29140 -29140
memory 179088 134272 44816 75%


i tried with 01 - 04, nothing worked for me
Highlighted
Acclaimed Contributor

Re: Out of Memory error while compiling on HP-UX B.11.00

Please provide "swapinfo -tam". It appears you have under configured your swap and RAM. You need multiple Gb.

>I tried with 01 - 04, nothing worked for me

You could try the default +O0.
Highlighted

Re: Out of Memory error while compiling on HP-UX B.11.00

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 18 494 4% 0 - 1 /dev/vg00/lvol2
reserve - 28 -28
memory 175 131 44 75%
total 687 177 510 26% - 0 -


With default also, its throwing the same error.
Highlighted
Acclaimed Contributor

Re: Out of Memory error while compiling on HP-UX B.11.00

>total 687 177 510 26%

You are likely out of swap while compiling.
You can check by adding at least 1 Gb of swap.
Or monitor the ctcom process in top and see how much memory it is using when it aborts.
Highlighted

Re: Out of Memory error while compiling on HP-UX B.11.00

This is the state of ctcom when the it is failing:

pts/0 12560 root 232 20 75040K 58656K run 0:14 94.43 49.82 ctcom.pa20

Highlighted
Acclaimed Contributor

Re: Out of Memory error while compiling on HP-UX B.11.00

>12560 root 232 20 75040K 58656K run 0:14 94.43 49.82 ctcom.pa20

This looks like you are out of swap. Unless the compiler tried to get 1 Gb at the very end.