When I read the False Exchange mechanism in java, I found the following code in java.util.concurrent.Exchanger.Slot
private static final class Slot extends AtomicReference<Object> {
long q0, q1, q2, q3, q4, q5, q6, q7, q8, q9, qa, qb, qc, qd, qe;
}
This is strange. It seems that the number of long ones is 15 (q0 - qe), so I can calculate the size of the object, which should be:
15 * 8 (long) + 8 (parent long value) + 16 (object header pointer in 64 bits jvm) = 144 bytes .
or:
15 * 8 (long) + 8 (parent long value) + 8 (object header pointer with 32-bit jvm) = 136 bytes.
When I read Disruptor Deployment:
public long p1, p2, p3, p4, p5, p6, p7;
private volatile long cursor = INITIAL_CURSOR_VALUE;
public long p8, p9, p10, p11, p12, p13, p14;
7 * 8 + 8 + 7 * 8 + 8 ( 32 jvm) = 128 = 64 * 2.
64 , discruptor impl " ".
, -
java.util.concurrent.Exchanger.Slot ?