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

Insufficient memory message says "malloc" when sometimes it should say "mmap"

    Details

    • Subcomponent:
    • Resolved In Build:
      b31

      Backports

        Description


        # There is insufficient memory for the Java Runtime Environment to continue.
        # Native memory allocation (malloc) failed to allocate 1048576 bytes for Allocator failed to commit

        I admit that this message is not perfect. First it says "(malloc)" even though it was actually mmap that failed. But this is I think more of a bug in vm_exit_out_of_memory() than in my use of it. There are several places that use VirtualSpace and when it fails call vm_exit_out_of_memory(). This has the same issue as my code. For example when we try to expand the heap in G1 with G1CollectedHeap::expand()

        The function vm_exit_out_of_memory() should pass a flag and print information whether it fails because of malloc or mmap.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ccheung Calvin Cheung
                  Reporter:
                  coleenp Coleen Phillimore
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: