It all depends on how the objects appear in the heap.  The current garbage
collector does no compaction, but it will release pages inside of the heap
that are free.

On Wed, Sep 9, 2009 at 10:51 AM, skink <[email protected]> wrote:

>
> hi,
>
> i dont know if i understand how gc releases physical memory
>
> lets assume that physical mem is divided into 4kB pages
>
> i allocate 2000 objects each 2kB long
>
> lets assume they are allocated one after another in physical memory
>
> then i release every even object 0, 2, 4 etc
>
> so i released 1000 objects x 2kB
>
> question: how many physical pages will be released to other processes?
>
> thanks
> pskink
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to