src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp

changeset 7687
af8f16ac392c
parent 7686
fb69749583e8
child 7994
04ff2f6cd0eb
child 9787
9f28a4cac6d9
     1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp	Thu Apr 09 15:58:49 2015 +0200
     1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp	Thu Apr 09 15:59:26 2015 +0200
     1.3 @@ -32,12 +32,10 @@
     1.4  #include "utilities/dtrace.hpp"
     1.5  
     1.6  // The following methods are used by the parallel scavenge collector
     1.7 -VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size,
     1.8 +VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t word_size,
     1.9                                                               uint gc_count) :
    1.10 -  VM_GC_Operation(gc_count, GCCause::_allocation_failure),
    1.11 -  _size(size),
    1.12 -  _result(NULL)
    1.13 -{
    1.14 +    VM_CollectForAllocation(word_size, gc_count, GCCause::_allocation_failure) {
    1.15 +  assert(word_size != 0, "An allocation should always be requested with this operation.");
    1.16  }
    1.17  
    1.18  void VM_ParallelGCFailedAllocation::doit() {
    1.19 @@ -47,7 +45,7 @@
    1.20    assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "must be a ParallelScavengeHeap");
    1.21  
    1.22    GCCauseSetter gccs(heap, _gc_cause);
    1.23 -  _result = heap->failed_mem_allocate(_size);
    1.24 +  _result = heap->failed_mem_allocate(_word_size);
    1.25  
    1.26    if (_result == NULL && GC_locker::is_active_and_needs_gc()) {
    1.27      set_gc_locked();

mercurial