commons-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=809868&view=rev
Log:
check for pagesize before granularity

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=809868&r1=809867&r2=809868&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:37:59 2009
@@ -57,6 +57,8 @@
     public void testTestMemoryMapAlignment()
         throws Throwable
     {
+        // TODO: Use at least Platform.GRANULARITY file size
+        //
         File f = new File("org/apache/commons/runtime/TestMemoryMap.class");
         MemoryMapProvider map = new MemoryMapProvider(f, EnumSet.of(FileOpenMode.READ));
         Pointer p1 = map.map(0, 128);
@@ -79,7 +81,9 @@
         if (pa == null) {
             try {
                 p4 = map.map(4096, 128);
-                System.out.println("Map allows 4k offset alignment");
+                System.out.println("Map allows Platform.PAGESIZE ("
+                                   Platform.PAGESIZE +
+                                   " bytes) offset alignment");
             } catch (IOException e) {
             }
         }



Mime
View raw message