Hi,
I have ported Python, numarray and numpy to the PharLap Embedded Operating System. Python 2.5.2 numpy 1.3.0b1. We use Visual Studio 6.0 for this. My problem is a massive memory loss coming back after Py_Finalize() after doing an import of numpy. I have seen similar posts about memory loss after Py_Finalize() but am unclear how to proceed. Here are my symptomns:-
Py_Initialize()
Py_Main()
>>>> import numpy
Py_Finalize()
This gives me a 2.34 MB memory loss each time through. Its similar for numarray. I suspect I would get comparible losses for other modules.
Do I need to do something before coming back from Py_Main ? (like setting all the reference counts to 0 and forcing the garbage collector to run). Doing a >>> del numpy is not enough.
I understand there is a memory loss when stopping and starting Python (I observe it to be about 70K) - my problem is that I dont know how to shutdown numpy cleanly - I want the opposite of "import numpy".
Thanks for any help
I have ported Python, numarray and numpy to the PharLap Embedded Operating System. Python 2.5.2 numpy 1.3.0b1. We use Visual Studio 6.0 for this. My problem is a massive memory loss coming back after Py_Finalize() after doing an import of numpy. I have seen similar posts about memory loss after Py_Finalize() but am unclear how to proceed. Here are my symptomns:-
Py_Initialize()
Py_Main()
>>>> import numpy
Py_Finalize()
This gives me a 2.34 MB memory loss each time through. Its similar for numarray. I suspect I would get comparible losses for other modules.
Do I need to do something before coming back from Py_Main ? (like setting all the reference counts to 0 and forcing the garbage collector to run). Doing a >>> del numpy is not enough.
I understand there is a memory loss when stopping and starting Python (I observe it to be about 70K) - my problem is that I dont know how to shutdown numpy cleanly - I want the opposite of "import numpy".
Thanks for any help