comparison src/share/vm/gc_implementation/shared/vmGCOperations.hpp @ 139:c0492d52d55b

6539517: CR 6186200 should be extended to perm gen allocation to prevent spurious OOM's from perm gen Reviewed-by: ysr, jmasa
author apetrusenko
date Tue, 01 Apr 2008 15:13:47 +0400
parents a61af66fc99e
children d1605aabd0a1
comparison
equal deleted inserted replaced
95:d05ebaf00ed0 139:c0492d52d55b
41 // VM_GC_HeapInspection 41 // VM_GC_HeapInspection
42 // - prints class histogram on SIGBREAK if PrintClassHistogram 42 // - prints class histogram on SIGBREAK if PrintClassHistogram
43 // is specified; and also the attach "inspectheap" operation 43 // is specified; and also the attach "inspectheap" operation
44 // 44 //
45 // VM_GenCollectForAllocation 45 // VM_GenCollectForAllocation
46 // VM_GenCollectForPermanentAllocation
46 // VM_ParallelGCFailedAllocation 47 // VM_ParallelGCFailedAllocation
47 // VM_ParallelGCFailedPermanentAllocation 48 // VM_ParallelGCFailedPermanentAllocation
48 // - this operation is invoked when allocation is failed; 49 // - this operation is invoked when allocation is failed;
49 // operation performs garbage collection and tries to 50 // operation performs garbage collection and tries to
50 // allocate afterwards; 51 // allocate afterwards;
164 { _gc_cause = gc_cause; } 165 { _gc_cause = gc_cause; }
165 ~VM_GenCollectFull() {} 166 ~VM_GenCollectFull() {}
166 virtual VMOp_Type type() const { return VMOp_GenCollectFull; } 167 virtual VMOp_Type type() const { return VMOp_GenCollectFull; }
167 virtual void doit(); 168 virtual void doit();
168 }; 169 };
170
171 class VM_GenCollectForPermanentAllocation: public VM_GC_Operation {
172 private:
173 HeapWord* _res;
174 size_t _size; // size of object to be allocated
175 public:
176 VM_GenCollectForPermanentAllocation(size_t size,
177 unsigned int gc_count_before,
178 unsigned int full_gc_count_before,
179 GCCause::Cause gc_cause)
180 : VM_GC_Operation(gc_count_before, full_gc_count_before, true),
181 _size(size) {
182 _res = NULL;
183 _gc_cause = gc_cause;
184 }
185 ~VM_GenCollectForPermanentAllocation() {}
186 virtual VMOp_Type type() const { return VMOp_GenCollectForPermanentAllocation; }
187 virtual void doit();
188 HeapWord* result() const { return _res; }
189 };