[Python-Dev] MemoryError... how much memory?

Ben Finney ben+python at benfinney.id.au
Thu Oct 28 00:00:32 CEST 2010


Facundo Batista <facundobatista at gmail.com> writes:

> On Wed, Oct 27, 2010 at 12:05 PM, Benjamin Peterson <benjamin at python.org> wrote:
>
> > Isn't this usually when you do something like [None]*2**300? In that
> > case, wouldn't you know how much memory you're requesting?
>
> It could happen on any malloc. It depends on how much you have free.

It also depends on how much is being requested. The caller knows that
amount, surely?

-- 
 \           “If you do not trust the source do not use this program.” |
  `\                                —Microsoft Vista security dialogue |
_o__)                                                                  |
Ben Finney



More information about the Python-Dev mailing list