comparison src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp @ 1387:0bfd3fb24150

6858496: Clear all SoftReferences before an out-of-memory due to GC overhead limit. Summary: Ensure a full GC that clears SoftReferences before throwing an out-of-memory Reviewed-by: ysr, jcoomes
author jmasa
date Tue, 13 Apr 2010 13:52:10 -0700
parents a61af66fc99e
children c18cbe5936b8
comparison
equal deleted inserted replaced
0:57e3d76f9a75 1:eb92e6e95e21
1 /* 1 /*
2 * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 2002-2010 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
43 // generation. Also diagnostics specific to generations have 43 // generation. Also diagnostics specific to generations have
44 // been added. 44 // been added.
45 45
46 // Forward decls 46 // Forward decls
47 class elapsedTimer; 47 class elapsedTimer;
48 class GenerationSizer;
48 49
49 class PSAdaptiveSizePolicy : public AdaptiveSizePolicy { 50 class PSAdaptiveSizePolicy : public AdaptiveSizePolicy {
50 friend class PSGCAdaptivePolicyCounters; 51 friend class PSGCAdaptivePolicyCounters;
51 private: 52 private:
52 // These values are used to record decisions made during the 53 // These values are used to record decisions made during the
338 size_t perm_live, 339 size_t perm_live,
339 size_t cur_eden, // current eden in bytes 340 size_t cur_eden, // current eden in bytes
340 size_t max_old_gen_size, 341 size_t max_old_gen_size,
341 size_t max_eden_size, 342 size_t max_eden_size,
342 bool is_full_gc, 343 bool is_full_gc,
343 GCCause::Cause gc_cause); 344 GCCause::Cause gc_cause,
345 CollectorPolicy* collector_policy);
344 346
345 // Calculates new survivor space size; returns a new tenuring threshold 347 // Calculates new survivor space size; returns a new tenuring threshold
346 // value. Stores new survivor size in _survivor_size. 348 // value. Stores new survivor size in _survivor_size.
347 int compute_survivor_space_size_and_threshold(bool is_survivor_overflow, 349 int compute_survivor_space_size_and_threshold(bool is_survivor_overflow,
348 int tenuring_threshold, 350 int tenuring_threshold,