The gc in dalvik is not very difficult.
I can understand most things and how they work.
But one thing I don't understand.
When freeing the memory allocated by mspace which is set int the bits
of heap bitmap, it uses xor operating to calculate what should be
collected.
Suppose like this:
After last gc      after this gc       result           should be
collected
0                      0                      0                 N
1                      1                      0                 N
1                      0                      1                 Y
0                      1                      1                 Y(Is
this right?)

The first three cases are obviously correct.
But the last case perhaps is wrong.
Although it was not used before last gc, it is used since then.
It should not be collected as garbage I think.
Can anyone explain why?

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to