Generally, the methods attempt to work with as-large-as-possible units of memory at a time.
It should be noted that when invoking scoped memory access get/set operations, it is imperative from a performance perspective to convey the sharp types from the call site in order for the compiler to pick the correct Unsafe access variant.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private static final long | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int[] | |
| pack-priv static final String | |
| private static final ScopedMemoryAccess |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: a 32-bit hash value calculated from the content in the providedsegment between the provided offsetsfrom which a content hash should be computed segment, long starting offset (inclusive) in the segment fromOffset, long ending offset (non-inclusive) in the segment toOffset)Returns a 32-bit hash value calculated from the content in the provided
|
| public static void | copy(AbstractMemorySegmentImpl src, long srcOffset, AbstractMemorySegmentImpl dst, long dstOffset, long size)
|
| public static MemorySegment | |
| public static long | mismatch(AbstractMemorySegmentImpl src, long srcFromOffset, long srcToOffset, AbstractMemorySegmentImpl dst, long dstFromOffset, long dstToOffset)
|
| private static long | mismatch(AbstractMemorySegmentImpl src, long srcFromOffset, AbstractMemorySegmentImpl dst, long dstFromOffset, long start, int length, boolean srcAndDstBytesDiffer)
|
| private static int | |
| private static int | |
| private static int | |
| pack-priv static int | |
| private static long | vectorizedMismatchLargeForBytes(MemorySessionImpl aSession, MemorySessionImpl bSession, Object a, long aOffset, Object b, long bOffset, long length)
Mismatch over long lengths. |
| BYTE_REPLICATOR | back to summary |
|---|---|
| private static final long BYTE_REPLICATOR | |
| LONG_MASK | back to summary |
|---|---|
| private static final long LONG_MASK | |
| NATIVE_THRESHOLD_COPY | back to summary |
|---|---|
| private static final int NATIVE_THRESHOLD_COPY | |
| NATIVE_THRESHOLD_FILL | back to summary |
|---|---|
| private static final int NATIVE_THRESHOLD_FILL | |
| NATIVE_THRESHOLD_MISMATCH | back to summary |
|---|---|
| private static final int NATIVE_THRESHOLD_MISMATCH | |
| POWERS_OF_31 | back to summary |
|---|---|
| private static final int[] POWERS_OF_31
| |
| PROPERTY_PATH | back to summary |
|---|---|
| pack-priv static final String PROPERTY_PATH | |
| SCOPED_MEMORY_ACCESS | back to summary |
|---|---|
| private static final ScopedMemoryAccess SCOPED_MEMORY_ACCESS | |
| SegmentBulkOperations | back to summary |
|---|---|
| private SegmentBulkOperations() | |
| contentHash | back to summary |
|---|---|
| public static int contentHash(AbstractMemorySegmentImpl segment, long fromOffset, long toOffset) Returns a 32-bit hash value calculated from the content in the provided
The method is implemented as a 32-bit polynomial hash function equivalent to: final long length = toOffset - fromOffset; segment.checkBounds(fromOffset, length); int result = 1; for (long i = fromOffset; i < toOffset; i++) { result = 31 * result + segment.get(JAVA_BYTE, i); } return result;
| |
| copy | back to summary |
|---|---|
public static void copy(AbstractMemorySegmentImpl src, long srcOffset, AbstractMemorySegmentImpl dst, long dstOffset, long size)
| |
| fill | back to summary |
|---|---|
public static MemorySegment fill(AbstractMemorySegmentImpl dst, byte value)
| |
| mismatch | back to summary |
|---|---|
public static long mismatch(AbstractMemorySegmentImpl src, long srcFromOffset, long srcToOffset, AbstractMemorySegmentImpl dst, long dstFromOffset, long dstToOffset)
| |
| mismatch | back to summary |
|---|---|
private static long mismatch(AbstractMemorySegmentImpl src, long srcFromOffset, AbstractMemorySegmentImpl dst, long dstFromOffset, long start, int length, boolean srcAndDstBytesDiffer)
| |
| mismatch | back to summary |
|---|---|
private static int mismatch(long first, long second)
| |
| mismatch | back to summary |
|---|---|
private static int mismatch(int first, int second)
| |
| mismatch | back to summary |
|---|---|
private static int mismatch(short first, short second)
| |
| powerOfPropertyOr | back to summary |
|---|---|
| pack-priv static int powerOfPropertyOr(String name, int defaultPower) | |
| vectorizedMismatchLargeForBytes | back to summary |
|---|---|
| private static long vectorizedMismatchLargeForBytes(MemorySessionImpl aSession, MemorySessionImpl bSession, Object a, long aOffset, Object b, long bOffset, long length) Mismatch over long lengths. | |