Fix two issues with the partial gc code.

* Eliminate a fence error in bitmap aliasing.  The heap structure
  uses asymetric bounds but the bitmap structure uses symmetric bounds.
  Bias accordingly.

* Explicitly covert the immune limit to a uintptr_t to muffle a compiler
  warning.

Change-Id: I05e74ab57035ee06eb6d88e773b1d680531a7e2f
diff --git a/vm/alloc/HeapSource.c b/vm/alloc/HeapSource.c
index b7757c2..defedc6 100644
--- a/vm/alloc/HeapSource.c
+++ b/vm/alloc/HeapSource.c
@@ -642,7 +642,7 @@
     assert(numHeaps == hs->numHeaps);
     for (i = 0; i < hs->numHeaps; ++i) {
         base = (uintptr_t)hs->heaps[i].base;
-        max = (uintptr_t)hs->heaps[i].limit;
+        max = (uintptr_t)hs->heaps[i].limit - 1;
         aliasBitmap(&objBits[i], &hs->objBits, base, max);
         aliasBitmap(&markBits[i], &hs->markBits, base, max);
     }
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index eab30ba..1b62cf4 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -168,7 +168,7 @@
     assert(dvmIsValidObject(obj));
 #endif
 
-    if ((char *)obj < ctx->immuneLimit) {
+    if (obj < ctx->immuneLimit) {
         assert(isMarked(obj, ctx));
         return;
     }
@@ -1141,7 +1141,7 @@
     dvmHeapSourceGetObjectBitmaps(objBits, markBits, numBitmaps);
     if (mode == GC_PARTIAL) {
         numSweepBitmaps = 1;
-        assert(gDvm.gcHeap->markContext.immuneLimit == objBits[0].base);
+        assert((uintptr_t)gDvm.gcHeap->markContext.immuneLimit == objBits[0].base);
     } else {
         numSweepBitmaps = numBitmaps;
     }