Why HeapBitmap.base pointer is alignment 4 KB?

by nari » Fri, 24 Jul 2009 12:32:52 GMT

Sponsored Links

I read GC of dalvikVM.
I had one question on the BitmapMarking.

--- start ---
/* file is dalvik/vm/alloc/HeapSource.c: addNewHeap() */
321:  static bool
322:  addNewHeap(HeapSource *hs, mspace *msp, size_t
323:  {

/* snip */

355:      if (!dvmHeapBitmapInit(&heap.objectBitmap,
356:                             (void *)ALIGN_DOWN_TO_PAGE_SIZE
357:                             heap.absoluteMaxSize,
358:                             "objects"))
--- end ---

Why used ALIGN_DOWN_TO_PAGE_SIZE()? (at 356line)
Anybody knows who would be the best person can answer about the

I thought overnight, but I did not understand it. :(

Narihiro Nakamura


Other Threads

1. Patch available for Horizontal scrolling in Grid view ?


Is there any patch available for Horizontal scrolling in Grid view ?

Please revert me with some suggestions.



2. adb upload

After I've signed and exported an .apk, is there a way to upload this 
automatically with Eclipse? This is a basic question, I know. If I press F11 I 
guess it is just recompiling an unsigned package.


3. Fragment question on when to acquire data?

4. Android Currency Display: Device vs. Emulator

5. losing PendingIntent on upgrade

6. Creating Text Icon in Ginger bread

7. Determining when getRecentTasks has changed