src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp

changeset 1583
05b775309e59
parent 1580
e018e6884bd8
child 1876
a8127dc669ba
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Mon Jan 04 14:51:26 2010 -0800
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp	Thu Jan 07 08:14:45 2010 -0800
     1.3 @@ -3075,7 +3075,18 @@
     1.4      if (rem > 0 && rem < MinChunkSize) {
     1.5        n--; rem += word_sz;
     1.6      }
     1.7 -    assert((ssize_t)n >= 1, "Control point invariant");
     1.8 +    // Note that at this point we may have n == 0.
     1.9 +    assert((ssize_t)n >= 0, "Control point invariant");
    1.10 +
    1.11 +    // If n is 0, the chunk fc that was found is not large
    1.12 +    // enough to leave a viable remainder.  We are unable to
    1.13 +    // allocate even one block.  Return fc to the
    1.14 +    // dictionary and return, leaving "fl" empty.
    1.15 +    if (n == 0) {
    1.16 +      returnChunkToDictionary(fc);
    1.17 +      return;
    1.18 +    }
    1.19 +
    1.20      // First return the remainder, if any.
    1.21      // Note that we hold the lock until we decide if we're going to give
    1.22      // back the remainder to the dictionary, since a concurrent allocation

mercurial