[Python-Dev] MemoryError... how much memory? (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Thu Oct 28 16:19:34 CEST 2010
- Previous message: [Python-Dev] MemoryError... how much memory?
- Next message: [Python-Dev] [Python-ideas] Move Demo scripts under Lib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 28 Oct 2010 15:54:50 +0200 Georg Brandl <g.brandl at gmx.net> wrote:
Am 28.10.2010 15:14, schrieb "Martin v. Löwis": >> Furthermore, our server is fairly complex: we're using quite some >> libraries to do different jobs, and one of the approaches (not the >> only one) that we're taking to deal with this beast is to analyze its >> memory-related behaviour from an external POV (thinking it as a black >> box). >> >> So, beyond it's arguable utility, do you think that having that >> information could harm us in some way? > > I think implementing it might do harm. When a memory error is raised, > you are typically out of memory, so allocating more memory might fail > (it just did). Therefore, allocating more objects or doing string > formatting will likely fail (unless the requested size is much larger > than the memory required for these operations). > > So the chance increases that you trigger a fatal error.
Especially since we have a MemoryError instance preallocated to avoid exactly this problem.
And which creates other problems of its own, such as keeping many objects alive: http://bugs.python.org/issue5437
;)
Antoine.
- Previous message: [Python-Dev] MemoryError... how much memory?
- Next message: [Python-Dev] [Python-ideas] Move Demo scripts under Lib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]