Re: JOGL 2.3.1 on armv6hf
Posted by
Xerxes Rånby on
Jul 09, 2015; 3:03pm
URL: https://forum.jogamp.org/JOGL-2-3-1-on-armv6hf-tp4034766p4034855.html
gouessej wrote
Good job. I like the solution "C" because there is no support of capacity expressed with a long in the current Java SE API and under Android. However, the maximum capacity is Integer.MAX_VALUE, i.e 2
GiB.
Yes it is a misfortunate API decision in java to use signed ints, it limits the max capacity of Direct ByteBuffer's to 2GB.
There has been filed enhancement bugs since 2001 to fix it
https://bugs.openjdk.java.net/browse/JDK-4496703 - (bf) Buffer classes limited by 32-bit addressing
but it has been ignored.
While investigating i found that there exist one alternative way to create a direct ByteBuffers using the MappedByteBuffer class. MappedByteBuffer is using mmap internally thus it should not have any size limitation. Unfortunally the implementation of MappedByteBuffer has added a fictive limitation of 2Gb here as well.
https://bugs.openjdk.java.net/browse/JDK-6347833 - (fs) Enhance MappedByteBuffer to support sizes >2GB on 64 bit platforms.
I hope these two bugs will be worked and fixed before i grow a white beard.