Why HeapBitmap.base pointer is alignment 4 KB?

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


Sponsored Links
 Hi.

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
mspAbsoluteMaxSize)
323:  {

/* snip */

355:      if (!dvmHeapBitmapInit(&heap.objectBitmap,
356:                             (void *)ALIGN_DOWN_TO_PAGE_SIZE
(heap.msp),
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
matter?

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 ?

Thanks

-- 

2. Send email in HTML format

Hello,

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

Intent sendIntent = new Intent(Intent.ACTION_SEND);
                sendIntent.setType("text/html");
                sendIntent.putExtra(Intent.EXTRA_TEXT,Constant.MAIL_BEGIN
+"<p2>"+"<br/>"+article.getAuthor()+"<br/>"+article.getDate()+"<br/
+Constant.MAIL_END);
                sendIntent.putExtra(Intent.EXTRA_SUBJECT, "LeFigaro.fr :
"+article.getTitle());
                //sendIntent.setType("message/rfc822");
                context.startActivity(Intent.createChooser(sendIntent,
"Title:"));

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

Thanks.

Matt.

-- 

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?