Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/shared/mutableSpace.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 | f95d63e2154a |
children | b632e80fc9dc |
comparison
equal
deleted
inserted
replaced
4730:7faca6dfa2ed | 4734:20bfb6d15a94 |
---|---|
49 HeapWord *end = (HeapWord*)round_down((intptr_t) mr.end(), page_size); | 49 HeapWord *end = (HeapWord*)round_down((intptr_t) mr.end(), page_size); |
50 if (end > start) { | 50 if (end > start) { |
51 size_t size = pointer_delta(end, start, sizeof(char)); | 51 size_t size = pointer_delta(end, start, sizeof(char)); |
52 if (clear_space) { | 52 if (clear_space) { |
53 // Prefer page reallocation to migration. | 53 // Prefer page reallocation to migration. |
54 os::free_memory((char*)start, size); | 54 os::free_memory((char*)start, size, page_size); |
55 } | 55 } |
56 os::numa_make_global((char*)start, size); | 56 os::numa_make_global((char*)start, size); |
57 } | 57 } |
58 } | 58 } |
59 } | 59 } |