diff options
author | Raymond Hettinger <python@rcn.com> | 2004-09-12 19:53:07 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-09-12 19:53:07 +0000 |
commit | a84f3abb9ed70a0b13181698fd8c270dd4abbb88 (patch) | |
tree | 7cbcb9c7c76b73e54751dc52704dd48fe5f67d09 /Python/errors.c | |
parent | 0e9980f75a203ee1b2ac28f76a76239446b271d6 (diff) | |
download | cpython-git-a84f3abb9ed70a0b13181698fd8c270dd4abbb88.tar.gz |
SF #1022910: Conserve memory with list.pop()
The list resizing scheme only downsized when more than 16 elements were
removed in a single step: del a[100:120]. As a result, the list would
never shrink when popping elements off one at a time.
This patch makes it shrink whenever more than half of the space is unused.
Also, at Tim's suggestion, renamed _new_size to new_allocated. This makes
the code easier to understand.
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions