Other |
---|
tbdResolved |
Blocks :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
The "wish address" parameter (aka "req_addr") for the os::reserve_memory() API is harmful and should be removed. See discussion at: http://mail.openjdk.java.net/pipermail/hotspot-dev/2015-April/017823.html. In short, on mmap-based implementations (linux,bsd,solaris), calling os::reserve_memory() with a non-NULL wish address will trash existing mappings at that address, which is almost never what the programmer wants. This is not a theoretical issue: programmers tend to confuse os::reserve_memory() with os::attempt_reserve_memory_at(). Unfortunately, often this does not lead to an immediate error, because address space is sparsely populated on 64bit. But if java vm is embedded into another application which already did a number of allocations, chance to trash existing mappings increases. For all cases where one would want to use a wish address with os::reserve_memory, an alternative API exists. So, this parameter should be removed and code which relies on this parameter closely examined (e.g. see JDK-8077276).
|