src/share/vm/memory/space.hpp

changeset 3290
d06a2d7fcd5b
parent 3156
f08d439fab8c
child 3335
3c648b9ad052
equal deleted inserted replaced
3289:a88de71c4e3a 3290:d06a2d7fcd5b
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, 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.
531 * we don't start compacting before there is a significant gain to be made.\ 531 * we don't start compacting before there is a significant gain to be made.\
532 * Occasionally, we want to ensure a full compaction, which is determined \ 532 * Occasionally, we want to ensure a full compaction, which is determined \
533 * by the MarkSweepAlwaysCompactCount parameter. \ 533 * by the MarkSweepAlwaysCompactCount parameter. \
534 */ \ 534 */ \
535 int invocations = SharedHeap::heap()->perm_gen()->stat_record()->invocations;\ 535 int invocations = SharedHeap::heap()->perm_gen()->stat_record()->invocations;\
536 bool skip_dead = ((invocations % MarkSweepAlwaysCompactCount) != 0); \ 536 bool skip_dead = (MarkSweepAlwaysCompactCount < 1) \
537 ||((invocations % MarkSweepAlwaysCompactCount) != 0); \
537 \ 538 \
538 size_t allowed_deadspace = 0; \ 539 size_t allowed_deadspace = 0; \
539 if (skip_dead) { \ 540 if (skip_dead) { \
540 const size_t ratio = allowed_dead_ratio(); \ 541 const size_t ratio = allowed_dead_ratio(); \
541 allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \ 542 allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \

mercurial