high memory usage on swig


29-09-2005 14:45:46

I'm trying to get pyogre running under linux. I've checked out trunk from subversion (since there was no linux package), and am running
python setup.py build
I initially had swig-1.3.21 installed, but it complained about missing std_multimap.i so I upgraded to the latest version of swig: 1.3.25. Swig now runs succesfully, but used all 3 gigs of my ram + swap. On my machine at home, which only has 1 gig of ram, swig failed due to running out of memory. Is there anyway to split up the .i files so swig doesn't use so much ram?


29-09-2005 16:10:28

On my laptop with 768Mb works perfectly well but I am running Linux and I don't know if it swaps or not. Splitting the .i files is hard because you need to generate separate modules from them (that was my original idea but interdependecies between ogre parts were strong and in the end Clay won that one. :D)


29-09-2005 17:23:08


I resolved a similiar problem to the one you are encountering on gentoo by creating a temp swap space:

Checking Memory and Swap Space

My setup was 512MB Ram + 700MB Swap + 900MB Temp Swap

Then removing the swap space after I was finished:
swapoff tmpswp
rm tmpswp

On linux it took about 10 minutes.


29-09-2005 19:22:09

I don't know what version of SWIG I have, but my 1GB machine doesn't run out of memory. I do have 1Gb of swap I think.


29-09-2005 19:41:37

Thanks, adding an extra gig of swap worked!