comparison src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.inline.hpp @ 4914:23c0eb012d6f

6330863: vm/gc/InfiniteList.java fails intermittently due to timeout Summary: in some cases, allocate from the old gen before doing a full gc Reviewed-by: stefank, jmasa
author jcoomes
date Thu, 16 Feb 2012 13:13:53 -0800
parents 2aa9ddbb9e60
children da91efe96a93
comparison
equal deleted inserted replaced
4913:ab4422d0ed59 4914:23c0eb012d6f
1 /* 1 /*
2 * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2006, 2012, Oracle and/or its affiliates. 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.
34 { 34 {
35 return UseParallelOldGC ? PSParallelCompact::total_invocations() : 35 return UseParallelOldGC ? PSParallelCompact::total_invocations() :
36 PSMarkSweep::total_invocations(); 36 PSMarkSweep::total_invocations();
37 } 37 }
38 38
39 inline bool ParallelScavengeHeap::should_alloc_in_eden(const size_t size) const
40 {
41 const size_t eden_size = young_gen()->eden_space()->capacity_in_words();
42 return size < eden_size / 2;
43 }
44
39 inline void ParallelScavengeHeap::invoke_scavenge() 45 inline void ParallelScavengeHeap::invoke_scavenge()
40 { 46 {
41 PSScavenge::invoke(); 47 PSScavenge::invoke();
42 } 48 }
43 49