Garbage collection
Steve Holden
steve at holdenweb.com
Thu Mar 22 04:39:12 EDT 2007
Alex Martelli wrote:
> Tom Wright <tew24 at spam.ac.uk> 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...
>
Yup, it's easier to be pragmatic and find the real solution to your
problem than it is to try and mould reality to your idea of what the
solution should be ...
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com
More information about the Python-list
mailing list