comparison src/os/linux/vm/os_linux.cpp @ 4734:20bfb6d15a94

7124829: NUMA: memory leak on Linux with large pages Summary: In os::free_memory() use mmap with the same attributes as for the heap space Reviewed-by: kvn Contributed-by: Aleksey Ignatenko <aleksey.v.ignatenko@intel.com>
author iveresov
date Tue, 27 Dec 2011 16:43:49 -0800
parents e7dead7e90af
children d7e3846464d0
comparison
equal deleted inserted replaced
4730:7faca6dfa2ed 4734:20bfb6d15a94
2544 // be supported or the memory may already be backed by huge pages. 2544 // be supported or the memory may already be backed by huge pages.
2545 ::madvise(addr, bytes, MADV_HUGEPAGE); 2545 ::madvise(addr, bytes, MADV_HUGEPAGE);
2546 } 2546 }
2547 } 2547 }
2548 2548
2549 void os::free_memory(char *addr, size_t bytes) { 2549 void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) {
2550 commit_memory(addr, bytes, false); 2550 commit_memory(addr, bytes, alignment_hint, false);
2551 } 2551 }
2552 2552
2553 void os::numa_make_global(char *addr, size_t bytes) { 2553 void os::numa_make_global(char *addr, size_t bytes) {
2554 Linux::numa_interleave_memory(addr, bytes); 2554 Linux::numa_interleave_memory(addr, bytes);
2555 } 2555 }