]> granicus.if.org Git - python/commit
_PyMalloc_Free(): As was already done for _PyMalloc_Malloc, rearranged
authorTim Peters <tim.peters@gmail.com>
Sun, 31 Mar 2002 02:18:01 +0000 (02:18 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 31 Mar 2002 02:18:01 +0000 (02:18 +0000)
commit2c95c99a644a62cd2544dd37be6e04b849b07416
tree4a7e9c52eab357f252d2305602b6f5040c4a759f
parent1e16db6d3b542b5cc146245055be0a04263c4e5e
_PyMalloc_Free():  As was already done for _PyMalloc_Malloc, rearranged
the code so that the most frequent cases come first.  Added comments.
Found a hidden assumption that a pool contains room for at least two
blocks, and added an assert to catch a violation if it ever happens in
a place where that matters.  Gave the normal "I allocated this block"
case a longer basic block to work with before it has to do its first
branch (via breaking apart an embedded assignment in an "if", and
hoisting common code out of both branches).
Objects/obmalloc.c