JDK-8253652 : Consider splitting attempt_reserve_memory_at
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2020-09-25
  • Updated: 2021-07-01
  • Resolved: 2021-07-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18Resolved
Related Reports
Relates :  
Description
Today it deals with code that provides file descriptor and code that does not. If we split this function into two, the code that doesn't care about fds will be much cleaner. This has already been done for os::reserve_memory.
Comments
Closing as no longer an issue.
01-07-2021

// Helper method +static char* attempt_map_or_reserve_memory_at(char* base, size_t size, int fd) { + if (fd != -1) { + return os::attempt_map_memory_to_file_at(base, size, fd); + } + return os::attempt_reserve_memory_at(base, size); +} + This was already done with JDK-8255254 and the code looks good now.
01-07-2021