hotspot/src/os/linux/vm/os_linux.cpp
changeset 10522 23830453e083
parent 10496 b209db6147cf
child 10565 dc90c239f4ec
child 10561 bf51fe78a9ad
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Fri Sep 02 21:33:57 2011 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Tue Sep 06 21:03:51 2011 -0700
@@ -2531,10 +2531,14 @@
       }
       return true;
     }
-    return false;
-  }
-
-  return commit_memory(addr, size, exec);
+    // Fall through and try to use small pages
+  }
+
+  if (commit_memory(addr, size, exec)) {
+    realign_memory(addr, size, alignment_hint);
+    return true;
+  }
+  return false;
 }
 
 void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) {