getting MemoryError with dicts; suspect memory fragmentation

Bryan bryanjugglercryptographer at yahoo.com
Fri Jun 4 16:40:21 EDT 2010


Philip Semanchuk wrote:
> At PyCon 2010, Brandon Craig Rhodes presented about how dictionaries  
> work under the hood:http://python.mirocommunity.org/video/1591/pycon-2010-the-mighty-dict...
>
> I found that very informative.

That's a fine presentation of hash tables in general and Python's
choices in particular. Also highly informative, while easily readable,
is the Objects/dictnotes.txt file in the Python source.

Fine as those resources may be, the issue here stands. Most of my own
Python issues turn out to be stupid mistakes, and the problem here
might be on that level, but Emin seems to have worked his problem and
gotten a bunch of stuff right. There is no good reason why
constructing a 50 kilobyte dict should fail with a MemoryError while
constructing 50 megabyte lists succeeds.


--
--Bryan Olson



More information about the Python-list mailing list