• traps and dies

    why?

    good barriers

    What do you call a ‘good barrier’? G1 is a rather well-regarded gc and uses the second barrier type I indicated.

    cost nothing (the overhead gets lots in the spare bandwidth of the CPU’s pipe)

    Costs nothing on the backend, sure. Very little code is backend-bottlenecked. But yes barriers are rather cheap in practice.


    score 2 · canonical

      • You will have to be more specific. The most popular java implementation is hotspot, and hotspot’s default gc is g1; g1’s write barrier is, as I said, if ((pointer ^ pointee) >> k) goto slow—remset maintenance iff pointer and pointee belong to different regions.


        score 4 · canonical