RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v6]

Kevin Rushforth kcr at openjdk.org
Wed Jun 11 20:14:38 UTC 2025


On Mon, 9 Jun 2025 19:42:07 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/com/sun/marlin/MaskMarlinAlphaConsumer.java line 110:
>> 
>>> 108: 
>>> 109:         for (int i = 0; i < _ALPHA_MAP.length; i++) {
>>> 110:             ALPHA_MAP_OFF_HEAP.putByte(i, _ALPHA_MAP[i]);
>> 
>> I guess this is only done once, but following multiple layers of calculation I think this array defaults to 64K long, in which case a bulk copy would be better, but it is perhaps out-of-scope for a 1:1 replacement
>> 
>> https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/foreign/MemorySegment.html#copy(java.lang.Object,int,java.lang.foreign.MemorySegment,java.lang.foreign.ValueLayout,long,int)
>
> Thanks. This seems like a good follow-up RFE. I'll file it.

[JDK-8359260](https://bugs.openjdk.org/browse/JDK-8359260)

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1814#discussion_r2140973406


More information about the openjfx-dev mailing list