--- old/src/share/vm/gc_implementation/shared/vmGCOperations.hpp 2015-02-06 12:38:24.596166989 +0100 +++ new/src/share/vm/gc_implementation/shared/vmGCOperations.hpp 2015-02-06 12:38:24.504170185 +0100 @@ -168,7 +168,8 @@ HeapWord* _result; // Allocation result (NULL if allocation failed) public: - VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause); + VM_CollectForAllocation(size_t word_size, uint gc_count_before, GCCause::Cause cause) + : VM_GC_Operation(gc_count_before, cause), _result(NULL), _word_size(word_size) {} HeapWord* result() const { return _result; @@ -183,7 +184,9 @@ bool tlab, uint gc_count_before) : VM_CollectForAllocation(word_size, gc_count_before, GCCause::_allocation_failure), - _tlab(tlab) {} + _tlab(tlab) { + assert(word_size != 0, "An allocation should always be requested with this operation."); + } ~VM_GenCollectForAllocation() {} virtual VMOp_Type type() const { return VMOp_GenCollectForAllocation; } virtual void doit();