8065788: os::reserve_memory() on Windows should not assert that allocation size is aligned to OS allocation granularity
authormgronlun
Wed, 03 Dec 2014 17:12:25 +0100
changeset 28014 3ca57ef4f132
parent 27882 ceece07bef14
child 28016 e42ebed2849d
8065788: os::reserve_memory() on Windows should not assert that allocation size is aligned to OS allocation granularity Reviewed-by: mgronlun, simonis Contributed-by: thomas.stuefe@sap.com
hotspot/src/os/windows/vm/os_windows.cpp
--- a/hotspot/src/os/windows/vm/os_windows.cpp	Wed Dec 03 20:40:00 2014 +0000
+++ b/hotspot/src/os/windows/vm/os_windows.cpp	Wed Dec 03 17:12:25 2014 +0100
@@ -3087,7 +3087,7 @@
 char* os::pd_reserve_memory(size_t bytes, char* addr, size_t alignment_hint) {
   assert((size_t)addr % os::vm_allocation_granularity() == 0,
          "reserve alignment");
-  assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size");
+  assert(bytes % os::vm_page_size() == 0, "reserve page size");
   char* res;
   // note that if UseLargePages is on, all the areas that require interleaving
   // will go thru reserve_memory_special rather than thru here.