[Python-Dev] Re: [Python-checkins] python/dist/src/Python import.c,2.210,2.211
Fri, 29 Nov 2002 22:52:32 +0100
On vrijdag, nov 29, 2002, at 21:47 Europe/Amsterdam,
> Update of /cvsroot/python/python/dist/src/Python
> In directory sc8-pr-cvs1:/tmp/cvs-serv20813/Python
> Modified Files:
> Log Message:
> Slightly improved version of patch #642578: "Expose
> in imp". This adds two functions to the imp module: get_frozenmodules()
> and set_frozenmodules().
Something that's been bothering me about frozen modules in the
classical sense (i.e. those that are stored in C static data
structures) is that the memory used by them is gone without any chance
at recovery. For big frozen Python programs that are to be run on small
machines this is a waste of precious memory.
With modules "frozen" with set_frozenmodules you could conceivably free
the data again after it has been imported (similar to what
MacPython-OS9 does with modules "frozen" in "PYC " resources).
Would that be worth the added complexity?
- Jack Jansen <Jack.Jansen@oratrix.com>
- If I can't dance I don't want to be part of your revolution -- Emma