Prajwal Kumar
Prajwal Kumar

Reputation: 177

Solaris 12.3 C++ compiler out of memory

I have a swig generated C++ code file of 24MB, nearly 5,00,000 lines of code. I am able to compile it when set the compiler Optimization level to xO0,but fails as soon as i add any other C++ compiler flags(like xprofile ...). I am using Solaris Studio 12.3 C++ compiler.

Below is the console error:

    Element size (in bytes):        48
    Table size (in elements):  2560000
    Table maximum size:        134217727
    Table size increment:         5000
    Bytes written to disk:           0
    Expansions required:             9
    Segments used:                   1
    Max Segments used:               1
    Max Segment offset:        134217727
    Segment offset size::           27
    Resizes made:                    0
    Copies due to expansions:        4
    Reset requests:                  0
    Allocation requests:       2827527
    Deallocation requests:      267537
    Allocated element count:      4086
    Free element count:        2555914
    Unused element count:            0
    Free list size (elements):       0

ir2hf: error: Out of memory

Thanks in Advance.

Upvotes: 1

Views: 265

Answers (1)

Edgar H
Edgar H

Reputation: 1518

I found this article suggesting that it has to do with the fact that Solaris the amount of memory for data segments.

Following the steps in the blog, try to remove the limit.

$ usermod -K defaultpriv=basic,sys_resource karel

Now logoff and logon again and change the limit:

$ ulimit -d unlimited

Then check that the limit has changed

$ ulimit -d

The output should be unlimited

Upvotes: 0

Related Questions