A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-December/040760.html below:

[Python-Dev] Int FutureWarnings and other 2.4 TODOs

[Python-Dev] Int FutureWarnings and other 2.4 TODOsTim Peters tim.one at comcast.net
Fri Dec 5 12:12:38 EST 2003
[Tim]
> ...
> So when you do range(10000000), and that list goes away, most of the
> space for the int objects it held ends up in millions of int objects
> pushed onto the int freelist.  They all stay there until the program
> shuts down (although they get reused to satisfy requests for new int
> objects).

BTW, using pymalloc instead wouldn't eliminate that allocated memory is
never returned to the OS.  pymalloc grabs large "arenas" from malloc(), and
never free()s them.  The fundamental difference is that pymalloc is
type-agnostic:  space gotten from pymalloc for, say, a dict, can later be
reused for, say, a string.  pymalloc's freelists are segregated by raw
memory size rather than by type, and a given chunk of pymalloc memory may
even move from one size list to another (any number of times).


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4