Philip Clayton wrote:
When using SaveState.saveChild to save the state, I am getting:
Timing - parse:0.0, semantics:0.0, translate:0.0, generate:0.0, run:43.7 Exception SysErr: SysErr ("Out of Memory", SOME ENOMEM) raised
Even after shareCommonData and fullGC I notice that
objSize rootFunction
returns
Timing - parse:0.0, semantics:0.0, translate:0.0, generate:0.0, run:63.4 val it = 218901122 : int
which is considerably larger than the 1382064 that is returned in a fresh poly session.
It is my understanding that the upper limit on the size of a state is determined by the resources available on a machine. Before looking into a 64 bit OS with more addressable memory etc. I wondered if it is possible to tell from the above values whether I am just trying to save something infeasibly large?
Phil, Bearing in mind that the number returned is the number of words not the number of bytes then I would say that you have a problem on a 32-bit system. saveState needs to allocate enough memory on top of the existing heap to copy all the reachable data so it's quite possible that there is insufficient space. Have you checked whether you have reached the limit set by ulimit (ulimit -d) or the available swap space?
Would you expect such a large size? Is this something you've run before? It may be worth trying PolyML.objProfile to print the numbers of objects of various sizes to see whether it's what you would expect given the data structures you have.
Regards, David