From 423d6e846a9a0127d6d94825332a4bb8a1ba49d7 Mon Sep 17 00:00:00 2001 From: iveresov Date: Fri, 8 May 2009 15:20:10 -0700 Subject: [PATCH] 6838842: NUMA allocator: Segfault during startup on Linux Summary: Restored os::free_memory() semantics Reviewed-by: apetrusenko --- src/os/linux/vm/os_linux.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp index b4705e4a7..63b3d6a43 100644 --- a/src/os/linux/vm/os_linux.cpp +++ b/src/os/linux/vm/os_linux.cpp @@ -2314,7 +2314,8 @@ bool os::commit_memory(char* addr, size_t size, size_t alignment_hint, 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) { -- GitLab