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. SDK opengl support - Just an advice

Hi, just broke my app yesterday with a classic openGL programming
error: not using power of 2 texture sizes... I corrected it but I did
it in the first place because:
- it's working in the emulator !
- it's strangely working in the dream and not at all in the droid !
(disclaimer: the width was 512 large, but not the height)

So, I was kinda mistaken in the first place :)  if you could add in
the SDK opengl software emulation a short fix which disable texturing
(in short, show a blank screen, like a real device) when the size is
not a power of 2, it would be great ! :)

Maybe I should file an issue ?



2. Send email in HTML format


I would like to send an email in text/html format. I tried by this
way :

Intent sendIntent = new Intent(Intent.ACTION_SEND);
                sendIntent.putExtra(Intent.EXTRA_SUBJECT, "LeFigaro.fr :

But HTML code isn't interpreted. Maybe Gmail app doesn't support
I'm interested for any suggestion to resolve this problem.




3. android.process.acore occupies 50%+ CPU all the time

4. Q: Enabling Antialiasing for OpenGL on Android?

5. Is it possible to add new Icons to Contacts View ??

6. Porting H.264 decoder to android framework

7. How can I partecipate to an Android project?