Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am reading the paper Garbage-First Garbage Collection (http://cs.williams.edu/~dbarowy/cs334s18/assets/p37-detlefs.pdf), in section 2.2 it mentions the write barrier. In order to filter out the object from the same region, it has the following code, when rTmp is 0 means rX and rY contains pointer from the same region

rTmp := rX XOR rY
rTmp := rTmp >> LogOfHeapRegionSize

But if assume LogOfHeapRegionSize is 4 (bin=100), and rX starts the address (bin 0), rY starts the address (bin 111), clearly, they are not in the same region, but apply the code above, we have

111 XOR 000 = 111
111 >> 4 = 0

gives they are in the same region, why? Am I understand the code in the right way?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
457 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...