OSDN Git Service

Remove excess generality from the bitmap sweep walking routine.
authorCarl Shapiro <cshapiro@google.com>
Wed, 1 Dec 2010 04:55:32 +0000 (20:55 -0800)
committerCarl Shapiro <cshapiro@google.com>
Wed, 1 Dec 2010 05:01:58 +0000 (21:01 -0800)
commitf6426e3bb2666a45637fe5e3faa6ceca2c1ead9d
tree9b888eb9975d111ef42361402cf71af9e276c693
parent003a38e99c980788535be7e94736ecee6617488d
Remove excess generality from the bitmap sweep walking routine.

The bitmaps that are passed to the sweep walking routine always have
the same base, bitsLen, and max values.  As such, there is no need to
account for situations where these values may be different.  This is
guarnateed because bitmaps being swept are actually private copies of
the global bitmaps which are initialized with common parameters.

Furthermore, the sweep callback does not change the max values, so we
do not need a clean-up loop to accomodate changes to max.  The sweep
routine operates on garbage objects and therefore has no need to set
bits in a bitmap and, by extension, update the max value.

Also eliminated was an obsolete TODO regarding the unrolling of a
loop.  We will leave that class of optimization to the compiler.

Change-Id: Iff6ede3d0ac68f88d381a06911fb6bd9cada926d
vm/alloc/HeapBitmap.c