diff options
Diffstat (limited to 'src/java/com/sun/gluegen/test')
-rw-r--r-- | src/java/com/sun/gluegen/test/TestPointerBufferEndian.java | 4 | ||||
-rw-r--r-- | src/java/com/sun/gluegen/test/TestStructAccessorEndian.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java index 1c180bd..ba77eed 100644 --- a/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java +++ b/src/java/com/sun/gluegen/test/TestPointerBufferEndian.java @@ -8,9 +8,11 @@ public class TestPointerBufferEndian { public static void main (String[] args) { boolean direct = args.length>0 && args[0].equals("-direct"); boolean ok = true; + int bitsPtr = CPU.getPointerSizeInBits(); + String bitsProp = System.getProperty("sun.arch.data.model"); String os = System.getProperty("os.name"); String cpu = System.getProperty("os.arch"); - System.out.println("OS: <"+os+"> CPU: <"+cpu+">"); + System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">"); System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); PointerBuffer ptr = direct ? PointerBuffer.allocateDirect(3) : PointerBuffer.allocate(3); diff --git a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java index 4f05256..dc53a10 100644 --- a/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java +++ b/src/java/com/sun/gluegen/test/TestStructAccessorEndian.java @@ -7,9 +7,11 @@ import java.nio.*; public class TestStructAccessorEndian { public static void main (String args[]) { boolean ok = true; + int bitsPtr = CPU.getPointerSizeInBits(); + String bitsProp = System.getProperty("sun.arch.data.model"); String os = System.getProperty("os.name"); String cpu = System.getProperty("os.arch"); - System.out.println("OS: <"+os+"> CPU: <"+cpu+">"); + System.out.println("OS: <"+os+"> CPU: <"+cpu+"> Bits: <"+bitsPtr+"/"+bitsProp+">"); System.out.println("CPU is: "+ (CPU.is32Bit()?"32":"64") + " bit"); System.out.println("Buffer is in: "+ (BufferFactory.isLittleEndian()?"little":"big") + " endian"); ByteBuffer tst = BufferFactory.newDirectByteBuffer(BufferFactory.SIZEOF_LONG * 3); |