6838842: NUMA allocator: Segfault during startup on Linux
authoriveresov
Fri, 08 May 2009 15:20:10 -0700
changeset 2751 710d33ee5da7
parent 2748 986f111ef897
child 2752 9c5a98d89814
child 2753 1e9bbaae891b
6838842: NUMA allocator: Segfault during startup on Linux Summary: Restored os::free_memory() semantics Reviewed-by: apetrusenko
hotspot/src/os/linux/vm/os_linux.cpp
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Thu May 07 17:09:48 2009 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Fri May 08 15:20:10 2009 -0700
@@ -2314,7 +2314,8 @@
 void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { }
 
 void os::free_memory(char *addr, size_t bytes) {
-  uncommit_memory(addr, bytes);
+  ::mmap(addr, bytes, PROT_READ | PROT_WRITE,
+         MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0);
 }
 
 void os::numa_make_global(char *addr, size_t bytes) {