8190308: Implementation: JEP 316: Heap Allocation on Alternative Memory Devices

Sub-task to be used for implementation of JEP 316: Support heap allocation on alternative memory devices

Reviewed-by: sangheki, tschatzl
This commit is contained in:
Kishor Kharbas 2017-11-29 17:03:10 -08:00
parent 3faa620f4c
commit 3fc999a1fe
14 changed files with 503 additions and 54 deletions

View file

@ -2585,6 +2585,17 @@ char* os::pd_reserve_memory(size_t bytes, char* requested_addr,
return addr;
}
char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr, int file_desc) {
assert(file_desc >= 0, "file_desc is not valid");
char* result = pd_attempt_reserve_memory_at(bytes, requested_addr);
if (result != NULL) {
if (replace_existing_mapping_with_file_mapping(result, bytes, file_desc) == NULL) {
vm_exit_during_initialization(err_msg("Error in mapping Java heap at the given filesystem directory"));
}
}
return result;
}
// Reserve memory at an arbitrary address, only if that area is
// available (and not reserved for something else).