commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r809857 - /commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemoryMap.java
Date Tue, 01 Sep 2009 07:00:11 GMT
Author: mturk
Date: Tue Sep  1 07:00:10 2009
New Revision: 809857

URL: http://svn.apache.org/viewvc?rev=809857&view=rev
Log:
Test Platform.PAGESIZE

Modified:
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemoryMap.java

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemoryMap.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemoryMap.java?rev=809857&r1=809856&r2=809857&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemoryMap.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemoryMap.java Tue
Sep  1 07:00:10 2009
@@ -62,6 +62,7 @@
         Pointer p1 = map.map(0, 128);
         Pointer p2 = map.map(0, 128);
         Pointer pa = null;
+        Pointer p4 = null;
         System.out.println();
         try {
             pa = map.map(4, 128);
@@ -71,21 +72,22 @@
         if (pa == null) {
             try {
                 pa = map.map(1024, 128);
-                System.out.println("Map requires 1k offset alignment");
+                System.out.println("Map allows 1k offset alignment");
             } catch (IOException e) {
             }
         }
         if (pa == null) {
             try {
-                pa = map.map(4096, 128);
-                System.out.println("Map requires 4k offset alignment");
+                p4 = map.map(4096, 128);
+                System.out.println("Map allows 4k offset alignment");
             } catch (IOException e) {
             }
         }
         if (pa == null) {
             try {
-                pa = map.map(65536, 128);
-                System.out.println("Map requires 64k offset alignment");
+                pa = map.map(Platform.PAGESIZE, 128);
+                System.out.println("Map requires Platform.PAGESIZE (" +
+                                   Platform.PAGESIZE + ") bytes offset alignment");
             } catch (IOException e) {
             }
         }



Mime
View raw message