Operating System - HP-UX
1753967 Members
7319 Online
108811 Solutions
New Discussion юеВ

Catastrophic error #21015: Out of memory

 
Dennis Handly
Acclaimed Contributor

Re: Catastrophic error #21015: Out of memory

>I am able to build my source without +Onofailsafe option.

Do you get a warning saying the compile is restarting at a lower opt level?
(In future compilers, we will no longer do that if we run out of memory.)

>Is this okay to use as a workaround? OR is it worth while to try other option?

If it drops the opt level of the whole file then you'll probably get better performance if you limit the opt level drop with:
+O1=function1,function2
Nandisha
Occasional Advisor

Re: Catastrophic error #21015: Out of memory

1.
After removing option +Onofailsafe, it builds with folloiwng warning:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Warning #21015-D: Out of memory

Warning #20013-D: Optimization aborted in function unknown. Attempting
compilation unit again but dropping the optimization level to +O1.
Please report this warning and error 21015 to HP. (20013)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2.
I directly lowering the optimization from +O2 to +O1. With this I am able to build required object file.

3.
Then I tried to include almost all changed procedure to +O1 (+O1=func1,func2, func3, etc) in the compiler line. But, still I got same Catastrophic error #21015. So, I don't think it's too effective.
Dennis Handly
Acclaimed Contributor

Re: Catastrophic error #21015: Out of memory

>After removing option +Onofailsafe, it builds with following warning:

Ok, the whole file is dropped to +O1 and unfortunately it doesn't list a particular function name. Do you have lots of data initialization?

>I directly lowering the optimization from +O2 to +O1.

That's the same as +Ofailsafe.

>3. Then I tried to include almost all changed procedure to +O1 (+O1=func1,func2, func3, etc) in the compiler line.

You may have to include ALL functions and then binary search though them to remove them.

Or break up any large functions.
Javed Khan_1
Valued Contributor

Re: Catastrophic error #21015: Out of memory

also look at the space available in /tmp
Never Give Up
Dennis Handly
Acclaimed Contributor

Re: Catastrophic error #21015: Out of memory

>Javed: also look at the space available in /tmp

Why? It would be illegal for the compiler to use space in /tmp/. It uses /var/tmp/ or $TMPDIR and then very very rarely. Use "cc -v".
error #21015: Out of memory is for swap space or maxdsiz and not disk space.
Nandisha
Occasional Advisor

Re: Catastrophic error #21015: Out of memory

Thanks..Will check this.