< prev index next >
src/share/vm/gc_implementation/shared/vmGCOperations.hpp
Print this page
rev 7780 : imported patch 8072621
rev 7781 : imported patch 8066771
rev 7782 : [mq]: review
@@ -166,11 +166,12 @@
protected:
size_t _word_size; // Size of object to be allocated (in number of words)
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;
}
};
@@ -181,11 +182,13 @@
public:
VM_GenCollectForAllocation(size_t word_size,
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();
};
< prev index next >