[GAP Forum] memory management in GAP

R. Keith Dennis gap at rkd.math.cornell.edu
Mon Nov 15 23:08:08 GMT 2010


Hi again - I have some questions regarding how one manages
memory usage in GAP - the manual doesn't seem to answer my
questions.

1.  Is it possible to enlarge the memory available in GAP from 
the "inside"?  That is, if one gets an out of memory error, is
it possible to do something from the GAP command line that is
more or less equivalent to starting with the -o option set to
a larger value?

My presumption is "no" since this didn't seem to be addressed in the
manual.

2.  Is there a way to force GAP to release memory it has used in a 
computation?  It appears that GAP hangs onto the memory & it can only
be recovered by killing GAP and starting over again.

I have a program that in a single case creates a table with say 1G of
data & uses up 30G of memory (in a 48G machine).  The program
finishes, I save the data, reset the variable containing the 1G of
data to [], and then wish to do the next case.  GAP does not release
the memory (according to top, according to GasmanStatistics &
according to its behavior).  I kill GAP, reload program & run the next
case with no problem.  Why must I do this?  Ok, am I making some
error?

Is there a way to use Gasman, or something else, to tell GAP to release
the memory it used?  I couldn't find this in the manual.  Is it there?

Are there tips for writing GAP code that avoids problems of this type?
Any suggestions are most welcome!

Keith






More information about the Forum mailing list