Tom Wright <[EMAIL PROTECTED]> wrote:

> real programs.  I can't help thinking that there are some situations where
> you need a lot of memory for a short time though, and it would be nice to
> be able to use it briefly and then hand most of it back.  Still, I see the
> practical difficulties with doing this.

What I do in those cases:
a. fork
b. do the memory-hogging work in the child process
c. meanwhile the parent just waits
d. the child sends back to the parent the small results
e. the child terminates
f. the parent proceeds merrily

I learned this architectural-pattern a long, long time ago, around the
time when fork first got implemented via copy-on-write pages... 


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to