09/20/2007, 05:15 PM
Does anyone know how to free up memory in SAGE?
I'm not even talking so much about being able to delete a particular variable, though that would be nice too.
No, I'm talking about memory used by local variables inside functions that have already executed. Unless these values are "static", they should effectively become unusable once the function exits.
BUT THEY CONTINUE TO EAT UP MEMORY!!!
Eventually, I've got 2 GB of virtual memory being used by variables I can't even access, variables I was willing to throw away hours ago. Normally, I would just save my work to disk, quit, and restart, thus freeing up all the memory. But I had a session this morning that had been crunching numbers for hours, and I had so little memory left, I couldn't even save my work to disk!
So please, does anyone know how to free up memory in SAGE? I'm looking for some sort of garbage collector that can look at the used memory and say to itself, "Hmm, here's 2 GB of memory sitting on a stack/heap somewhere, that isn't even referenced anymore. Maybe I should free this memory..."
I'm not even talking so much about being able to delete a particular variable, though that would be nice too.
No, I'm talking about memory used by local variables inside functions that have already executed. Unless these values are "static", they should effectively become unusable once the function exits.
BUT THEY CONTINUE TO EAT UP MEMORY!!!
Eventually, I've got 2 GB of virtual memory being used by variables I can't even access, variables I was willing to throw away hours ago. Normally, I would just save my work to disk, quit, and restart, thus freeing up all the memory. But I had a session this morning that had been crunching numbers for hours, and I had so little memory left, I couldn't even save my work to disk!
So please, does anyone know how to free up memory in SAGE? I'm looking for some sort of garbage collector that can look at the used memory and say to itself, "Hmm, here's 2 GB of memory sitting on a stack/heap somewhere, that isn't even referenced anymore. Maybe I should free this memory..."
~ Jay Daniel Fox