releasing memory to malloc

Paul Rubin http
Thu Sep 28 17:40:00 EDT 2006


Bryan Olson <fakeaddress at nowhere.org> writes:
> I think I see what you're doing, but fork() after step 1 will
> create a child process with the same memory allocated.
> 
> I think it would make more sense to do step 1 in a subprocess.
> Use the subprocess module or one of the older popen()s to create
> a process that builds the target object, pickles it and pipes
> it back to the main process, then exits.

Sorry, yes, that's what I meant.  I shouldn't have used the word fork
without further qualification, which specifically means the child
process has all the same data.  What's needed would traditionally have
been done by a fork followed by an exec, and popen would have done
something like that.  These days I think there's some more streamlined
ways to do it.



More information about the Python-list mailing list