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

changeset 2194
e41cd7fd68a6
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp	Thu Sep 30 12:15:13 2010 -0700
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/cmsPermGen.cpp	Fri Oct 01 16:12:54 2010 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -50,6 +50,18 @@
    1.11    }
    1.12  }
    1.13  
    1.14 +HeapWord* CMSPermGen::request_expand_and_allocate(Generation* gen,
    1.15 +                                                  size_t size,
    1.16 +                                                  GCCause::Cause prev_cause /* ignored */) {
    1.17 +  HeapWord* obj = gen->expand_and_allocate(size, false);
    1.18 +  if (gen->capacity() >= _capacity_expansion_limit) {
    1.19 +    set_capacity_expansion_limit(gen->capacity() + MaxPermHeapExpansion);
    1.20 +    assert(((ConcurrentMarkSweepGeneration*)gen)->should_concurrent_collect(),
    1.21 +           "Should kick off a collection if one not in progress");
    1.22 +  }
    1.23 +  return obj;
    1.24 +}
    1.25 +
    1.26  void CMSPermGen::compute_new_size() {
    1.27    _gen->compute_new_size();
    1.28  }

mercurial