android - What are the advantages and disadvantages of having mark bits together and separate for Garbage Collection -
i watching video google io 2008 - dalvik virtual machine internals understand how dalvik vm works , why people has preferred dalvik vm on jvm android. found android uses separate memory garbage information objects , opposed jvm have mark bits(bits telling whether object able garbagfe collection or not) objects.
can tell me in detail advantages , disadvantages of having separate memory marks bits , not having separate memory mark bits ?
i unable difference watching video.
some advantages of separate bitmap:
- much denser. typical gc needs maybe 8 bits of gc metadata, due alignment in-object header might round memory 32 bits.
- some operations, in particular around sweeping, become faster. partly because denser (see above) bitmap means less memory traffic , better cache use, because operations (e.g. zeroing mark bits) can vectorized when in format. (other parts of gc needs designed make use of ability.)
- if
fork()
on unix system, separate bitmark makes better use of copy-on-write: pages containing objects might remain shared.
some advantages of in-object mark bits:
- depending on scheme used associate objects bitmaps, getting mark bit object , vice versa can quite complicated and/or slow. in-object header, on other hand, trivial access.
- easier memory management: no need create separate allocation of right size , keep in sync.
- many fast schemes finding bitmaps objects , vice versa quite restrictive in other regards. example, if create bitmap every page , store bitmap pointer @ start of page, have problem storing objects larger page.
Comments
Post a Comment