Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8205335

General purpose functions in os:: namespace should not exit the VM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 11
    • hotspot
    • None

      JDK-8190308 (Implementation: JEP 316: Heap Allocation on Alternative Memory Devices) causes the general purpose functions "os::reserve_memory_aligned" and "os::map_memory_to_file" to exit the VM in case of an error.

      This, in my eyes, is an error, since general purpose function should under no circumstances exit the process.

      In addition to that, we have "os::create_file_for_heap", which also exits the process. This is more ambivalent, since by its name it is no general purpose function but a "one-trick-pony"; the clear intention of this function is to create a memory range for one particular purpose - the java heap. But I still would very much prefer the function not exit the process.

      Imho, in all these cases the decision of exiting the process should be done by the caller using this function.


            Unassigned Unassigned
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: