]> granicus.if.org Git - python/commit
Now that we're no longer linking arenas together, there's no need to
authorTim Peters <tim.peters@gmail.com>
Sat, 30 Mar 2002 07:04:41 +0000 (07:04 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 30 Mar 2002 07:04:41 +0000 (07:04 +0000)
commit3c83df2047b865dde2b400fee2dea336dbbaf99d
treea5798e1a8d52f5ab9b902c88749d1e0d17948c69
parent12300686ca805289a340b740856ad00139a9b3c8
Now that we're no longer linking arenas together, there's no need to
waste the first pool if malloc happens to return a pool-aligned address.

This means the number of pools per arena can now vary by 1.  Unfortunately,
the code counted up from 0 to a presumed constant number of pools.  So
changed the increasing "watermark" counter to a decreasing "nfreepools"
counter instead, and fiddled various stuff accordingly.  This also allowed
getting rid of two more macros.

Also changed the code to align the first address to a pool boundary
instead of a page boundary.  These are two parallel sets of macro #defines
that happen to be identical now, but the page macros are in theory more
restrictive (bigger), and there's simply no reason I can see that it
wasn't aligning to the less restrictive pool size all along (the code
only relies on pool alignment).

Hmm.  The "page size" macros aren't used for anything *except* defining
the pool size macros, and the comments claim the latter isn't necessary.
So this has the feel of a layer of indirection that doesn't serve a
purpose; should probably get rid of the page macros now.
Objects/obmalloc.c