@Test public void testPointer() { System.out.println("Pointer"); assertEquals(maxBytes, Pointer.maxBytes); assertEquals(3, Pointer.maxRetries); assertTrue(new Pointer().equals(null)); Pointer p = new Pointer() { { address = 0xDEADBEEF; }}; assertEquals(p, new Pointer(p)); long physicalBytes = Pointer.physicalBytes(); long totalPhysicalBytes = Pointer.totalPhysicalBytes(); long availablePhysicalBytes = Pointer.availablePhysicalBytes(); System.out.println(physicalBytes); System.out.println(totalPhysicalBytes); System.out.println(availablePhysicalBytes); assertTrue(physicalBytes > 0); assertTrue(totalPhysicalBytes > 0 && physicalBytes < totalPhysicalBytes); assertTrue(availablePhysicalBytes > 0 && availablePhysicalBytes < totalPhysicalBytes); p = Pointer.malloc(1000); assertTrue(!p.isNull()); p = Pointer.calloc(1000, 1000); assertTrue(!p.isNull()); p = Pointer.realloc(p, 1000); assertTrue(!p.isNull()); Pointer.free(p); }
public Pointer() {}
Pointer implements AutoCloseable { public Pointer() {} }
Pointer implements AutoCloseable { public Pointer() {} Pointer();  Pointer(final Pointer p);  Pointer(final Buffer b); }
Pointer implements AutoCloseable { public Pointer() {} Pointer();  Pointer(final Pointer p);  Pointer(final Buffer b); static String formatBytes(long bytes); static long parseBytes(String string); static void deallocateReferences(); static long maxBytes(); static long totalBytes(); static long maxPhysicalBytes(); @Name("JavaCPP_physicalBytes") static synchronized native long physicalBytes(); @Name("JavaCPP_totalPhysicalBytes") static native long totalPhysicalBytes(); @Name("JavaCPP_availablePhysicalBytes") static native long availablePhysicalBytes(); boolean isNull(); void setNull(); long address(); long position(); P position(long position); long limit(); P limit(long limit); long capacity(); P capacity(long capacity); @Override void close(); void deallocate(); void deallocate(boolean deallocate); int offsetof(String member); int sizeof(); ByteBuffer asByteBuffer(); Buffer asBuffer(); static native Pointer malloc(long size); static native Pointer calloc(long n, long size); static native Pointer realloc(Pointer p, long size); static native void free(Pointer p); static native Pointer memchr(Pointer p, int ch, long size); static native int memcmp(Pointer p1, Pointer p2, long size); static native Pointer memcpy(Pointer dst, Pointer src, long size); static native Pointer memmove(Pointer dst, Pointer src, long size); static native Pointer memset(Pointer dst, int ch, long size); P put(Pointer p); P fill(int b); P zero(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
Pointer implements AutoCloseable { public Pointer() {} Pointer();  Pointer(final Pointer p);  Pointer(final Buffer b); static String formatBytes(long bytes); static long parseBytes(String string); static void deallocateReferences(); static long maxBytes(); static long totalBytes(); static long maxPhysicalBytes(); @Name("JavaCPP_physicalBytes") static synchronized native long physicalBytes(); @Name("JavaCPP_totalPhysicalBytes") static native long totalPhysicalBytes(); @Name("JavaCPP_availablePhysicalBytes") static native long availablePhysicalBytes(); boolean isNull(); void setNull(); long address(); long position(); P position(long position); long limit(); P limit(long limit); long capacity(); P capacity(long capacity); @Override void close(); void deallocate(); void deallocate(boolean deallocate); int offsetof(String member); int sizeof(); ByteBuffer asByteBuffer(); Buffer asBuffer(); static native Pointer malloc(long size); static native Pointer calloc(long n, long size); static native Pointer realloc(Pointer p, long size); static native void free(Pointer p); static native Pointer memchr(Pointer p, int ch, long size); static native int memcmp(Pointer p1, Pointer p2, long size); static native Pointer memcpy(Pointer dst, Pointer src, long size); static native Pointer memmove(Pointer dst, Pointer src, long size); static native Pointer memset(Pointer dst, int ch, long size); P put(Pointer p); P fill(int b); P zero(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }