You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/01 09:37:59 UTC
svn commit: r809868 -
/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemoryMap.java
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) {
}
}