A fast write barrier algorithm for the generation of garbage collector

Source: Internet
Author: User

Paper: A Fast Write Barrier for generational garbage collectors

Http://hoelzle.org/publications/write-barrier.pdf


The old age needs to record the reference to the new generation of objects, so that the new generation after the GC change the corresponding position of the old reference, or scan the entire old age. These tokens are called remembered Set. The mechanism that ensures that the reference location of the intergenerational is marked is called a write barrier or a store Check.

Generally using the card marking algorithm, the heap is divided into many card, each card2^k word (k=5,6,7), on 32 bits is generally 128,256, or 1024 bytes, each card a tag, Each store operation when the corresponding card object reference is changed, the card tag, in the recovery phase scan this card to change the reference to the latest. The tag that starts a card is a bit, but the performance is poor, changing the bit to 1 byte, even so, the extra overhead of memory is small.

The initial marking requires three SPARC commands:

St  [%obj + offset],%ptr
Add%obj, offset,%tempsll%temp, K,%tempst  %g0, [%byte_map +%temp]

In order to achieve the performance of the location of the object to find the same card, so that only two instructions, but the recovery requires multiple scanning:

St  [%obj + offset],%ptr
SLL%obj, K,%tempst  %g0, [%byte_map +%temp]

Marking accounted for the total write barrier time (also including the purge Phase scan card) 40%-100%, which accounted for 40% of the total GC overhead.

A fast write barrier algorithm for the generation of garbage collector

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.