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

vm_exit_out_of_memory() sometimes called prematurely.

XMLWordPrintable

    • sol-beta2
    • generic
    • solaris_7

      Date: Tue, 06 Jun 2000 23:27:16 -0700
      From: "Steffen Grarup" <###@###.###>
      Subject: Re: request for comment
      To: "jon.masamitsu" <###@###.###>
      Cc: ###@###.###

      Jon,

      Please make that change. It should be completely safe and is certainly
      better. You may want to combine the two:

      > < if (!succeeded) {
      > ---
      > > if (!succeeded && free() < size*wordSize) {

      That would have slightly better performance (probably in the noise, though).

      /Steffen




      "jon.masamitsu" wrote:
      >
      > Currently,
      >
      > oop* OneSpaceOldGeneration::safepoint_allocate_and_expand(int size)
      >
      > does a hard memory error exit - calls
      >
      > vm_exit_out_of_memory(size*wordSize, "heap expansion");^M
      >
      > if the heap cannot be expanded by the requested "size". Even though
      > the expand may not have expanded by "size", it may have expanded
      > enough to allow the allocation - the expansion may go to the limit
      > of the heap and that plus the free space previously in the heap may
      > be enough. I'd like to change the test as below. Instead of using
      > the return value from the call to expand(), check the free space
      > before calling for a hard memory error exit.
      >
      > Comments?
      >
      > PS. The current code can lead to the start of a scavenge that should
      > succeed (there is enough old generation space to guarantee the
      > worst case evacuation) but fails due to the failure to expand
      > the full "size".
      >
      > PPS. I expect to be at JavaOne tomorrow and will gather up the comments
      > when I get back to the office.
      >
      > ------- generation.cpp -------
      > 480c481,482
      > < if (!succeeded) {
      > ---
      > > // expand() may not have fully succeeded but still expanded enough.
      > > if (free() < size*wordSize) {

            jmasa Jon Masamitsu (Inactive)
            jmasa Jon Masamitsu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: