OSDN Git Service

Reduce the frequency of bitmap walk loop-bound computations.
authorCarl Shapiro <cshapiro@google.com>
Mon, 30 Aug 2010 18:10:45 +0000 (11:10 -0700)
committerCarl Shapiro <cshapiro@google.com>
Mon, 30 Aug 2010 18:10:45 +0000 (11:10 -0700)
Change-Id: I899b5ffe06a71f5c0b5de671edd6e8386a2688da

vm/alloc/HeapBitmap.h

index b0dea99..8474963 100644 (file)
@@ -146,8 +146,8 @@ HB_INLINE_PROTO(
                 word &= ~(highBit >> shift);
                 void *addr = (void *)(ptrBase + shift * HB_OBJECT_ALIGNMENT);
                 (*callback)(addr, arg);
-                end = HB_OFFSET_TO_INDEX(bitmap->max - bitmap->base);
             }
+            end = HB_OFFSET_TO_INDEX(bitmap->max - bitmap->base);
         }
     }
 }