auto import from //branches/cupcake/...@125939
diff --git a/vm/alloc/MarkSweep.c b/vm/alloc/MarkSweep.c
index cdda9c6..a0601d7 100644
--- a/vm/alloc/MarkSweep.c
+++ b/vm/alloc/MarkSweep.c
@@ -99,7 +99,7 @@
      * TODO: be better about memory usage; use a smaller stack with
      *       overflow detection and recovery.
      */
-    size = dvmHeapSourceGetIdealFootprint() /
+    size = dvmHeapSourceGetIdealFootprint() * sizeof(Object*) /
             (sizeof(Object) + HEAP_SOURCE_CHUNK_OVERHEAD);
     size = ALIGN_UP_TO_PAGE_SIZE(size);
     fd = ashmem_create_region("dalvik-heap-markstack", size);