mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-10 13:39:30 +00:00
8271252: os::reserve_memory should not use mtOther as default NMT flag
Reviewed-by: zgu
This commit is contained in:
parent
549c6c22ae
commit
d4eeeb82cb
@ -1684,12 +1684,8 @@ bool os::create_stack_guard_pages(char* addr, size_t bytes) {
|
||||
char* os::reserve_memory(size_t bytes, bool executable, MEMFLAGS flags) {
|
||||
char* result = pd_reserve_memory(bytes, executable);
|
||||
if (result != NULL) {
|
||||
MemTracker::record_virtual_memory_reserve(result, bytes, CALLER_PC);
|
||||
if (flags != mtOther) {
|
||||
MemTracker::record_virtual_memory_type(result, flags);
|
||||
}
|
||||
MemTracker::record_virtual_memory_reserve(result, bytes, CALLER_PC, flags);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -354,7 +354,7 @@ class os: AllStatic {
|
||||
static int vm_allocation_granularity();
|
||||
|
||||
// Reserves virtual memory.
|
||||
static char* reserve_memory(size_t bytes, bool executable = false, MEMFLAGS flags = mtOther);
|
||||
static char* reserve_memory(size_t bytes, bool executable = false, MEMFLAGS flags = mtNone);
|
||||
|
||||
// Reserves virtual memory that starts at an address that is aligned to 'alignment'.
|
||||
static char* reserve_memory_aligned(size_t size, size_t alignment, bool executable = false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user