How to catch an memory error in Windows?
toyze.rocha at gmail.com
Mon Jul 25 11:40:55 EDT 2011
I just want to use the Python part to catch this event as an error
I just wanted to know if there is any special error that I can use to catch
---------- Forwarded message ----------
From: Thomas Jollans <t at jollybox.de>
To: python-list at python.org
Date: Mon, 25 Jul 2011 17:14:46 +0200
Subject: Re: How to catch an memory error in Windows?
On 25/07/11 16:55, António Rocha wrote:
> I'm using subprocess module to run an external Windows binary. Due to
> some limitations, sometimes all memory is consumed in this process. How
> can I catch this error?
How is this relevant to the Python part?
Also, "no memory left" is not necessarily an error, it's simply a fact
of life. How to catch it depends on how you're (here, "you" means the
external process) allocating the memory - The POSIX C malloc function
will return NULL and set errno to ENOMEM, for example.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list