Re: Python memory handling
- From: "Chris Mellon" <arkanes@xxxxxxxxx>
- Date: Thu, 31 May 2007 16:13:45 -0500
On 5/31/07, Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx> wrote:
* Chris Mellon (Thu, 31 May 2007 12:10:07 -0500)
> > Like:
> > import pool
> > pool.free()
> > pool.limit(size in megabytes)
> >
> > Why not letting the user choosing that, why not giving the user more
> > flexibility ?
> > I will try later under linux with the latest stable python
> >
> > Regards,
> > FP
> >
>
> The idea that memory allocated to a process but not being used is a
> "cost" is really a fallacy, at least on modern virtual memory sytems.
> It matters more for fully GCed languages, where the entire working set
> needs to be scanned, but the Python GC is only for breaking refcounts
> and doesn't need to scan the entire memory space.
>
> There are some corner cases where it matters, and thats why it was
> addressed for 2.5, but in general it's not something that you need to
> worry about.
If it's swapped to disk than this is a big concern. If your Python app
allocates 600 MB of RAM and does not use 550 MB after one minute and
this unused memory gets into the page file then the Operating System
has to allocate and write 550 MB onto your hard disk. Big deal.
It happens once, and only in page-sized increments. You'd have to have
unusual circumstances to even notice this "big deal", totally aside
from the unusual and rare conditions that would trigger it.
.
- References:
- Python memory handling
- From: frederic . pica
- Re: Python memory handling
- From: Josh Bloom
- Re: Python memory handling
- From: frederic . pica
- Re: Python memory handling
- From: Chris Mellon
- Re: Python memory handling
- From: Thorsten Kampe
- Python memory handling
- Prev by Date: Re: non standard path characters
- Previous by thread: Re: Python memory handling
- Next by thread: Re: Python memory handling
- Index(es):
Relevant Pages
|