src/share/vm/memory/space.hpp

changeset 5125
2958af1d8c5a
parent 5119
12f651e29f6b
child 6198
55fb97c4c58d
child 6461
bdd155477289
equal deleted inserted replaced
5104:513a5298c1dd 5125:2958af1d8c5a
535 /* We allow some amount of garbage towards the bottom of the space, so \ 535 /* We allow some amount of garbage towards the bottom of the space, so \
536 * we don't start compacting before there is a significant gain to be made.\ 536 * we don't start compacting before there is a significant gain to be made.\
537 * Occasionally, we want to ensure a full compaction, which is determined \ 537 * Occasionally, we want to ensure a full compaction, which is determined \
538 * by the MarkSweepAlwaysCompactCount parameter. \ 538 * by the MarkSweepAlwaysCompactCount parameter. \
539 */ \ 539 */ \
540 int invocations = MarkSweep::total_invocations(); \ 540 uint invocations = MarkSweep::total_invocations(); \
541 bool skip_dead = (MarkSweepAlwaysCompactCount < 1) \ 541 bool skip_dead = ((invocations % MarkSweepAlwaysCompactCount) != 0); \
542 ||((invocations % MarkSweepAlwaysCompactCount) != 0); \
543 \ 542 \
544 size_t allowed_deadspace = 0; \ 543 size_t allowed_deadspace = 0; \
545 if (skip_dead) { \ 544 if (skip_dead) { \
546 const size_t ratio = allowed_dead_ratio(); \ 545 const size_t ratio = allowed_dead_ratio(); \
547 allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \ 546 allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \

mercurial