29import org.jau.sys.PlatformProps;
30import org.jau.sys.MachineDataInfo;
31import org.jau.sys.RuntimeProps;
32import org.junit.Assert;
33import org.junit.FixMethodOrder;
35import org.junit.runners.MethodSorters;
37import jau.test.junit.util.JunitTracer;
39@FixMethodOrder(MethodSorters.NAME_ASCENDING)
64 final int ps = machine.pageSizeInBytes();
65 System.err.println(
"PageSize: "+ps);
66 Assert.assertTrue(
"PageSize is 0", 0 < ps );
68 final int ps_pages = machine.
pageCount(ps);
69 Assert.assertTrue(
"PageNumber of PageSize is not 1, but "+ps_pages, 1 == ps_pages);
71 final int sz0 = ps - 10;
72 final int sz0_pages = machine.
pageCount(sz0);
73 Assert.assertTrue(
"PageNumber of PageSize-10 is not 1, but "+sz0_pages, 1 == sz0_pages);
75 final int sz1 = ps + 10;
76 final int sz1_pages = machine.
pageCount(sz1);
77 Assert.assertTrue(
"PageNumber of PageSize+10 is not 2, but "+sz1_pages, 2 == sz1_pages);
80 Assert.assertTrue(
"PageAlignedSize of PageSize is not PageSize, but "+ps_psa, ps == ps_psa);
83 Assert.assertTrue(
"PageAlignedSize of PageSize-10 is not PageSize, but "+sz0_psa, ps == sz0_psa);
86 Assert.assertTrue(
"PageAlignedSize of PageSize+10 is not 2*PageSize, but "+sz1_psa, ps*2 == sz1_psa);
89 public static void main(
final String args[]) {
91 org.junit.runner.JUnitCore.
main(tstname);
Machine data description for alignment and size onle, see com.jogamp.gluegen.
int pageCount(final int size)
int pageAlignedSize(final int size)
Runtime platform properties derived from PlatformProps and runtime query.
static final MachineDataInfo MACH_DESC_RT
Runtime determined MachineDataInfo, null if not available (i.e.