mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6765804: GC "dead ratios" should be unsigned
Reviewed-by: ysr, tonyp
This commit is contained in:
parent
8eb2e02296
commit
401e04572a
6 changed files with 27 additions and 26 deletions
|
@ -421,7 +421,7 @@ public:
|
|||
|
||||
// The maximum percentage of objects that can be dead in the compacted
|
||||
// live part of a compacted space ("deadwood" support.)
|
||||
virtual int allowed_dead_ratio() const { return 0; };
|
||||
virtual size_t allowed_dead_ratio() const { return 0; };
|
||||
|
||||
// Some contiguous spaces may maintain some data structures that should
|
||||
// be updated whenever an allocation crosses a boundary. This function
|
||||
|
@ -507,7 +507,7 @@ protected:
|
|||
\
|
||||
size_t allowed_deadspace = 0; \
|
||||
if (skip_dead) { \
|
||||
int ratio = allowed_dead_ratio(); \
|
||||
const size_t ratio = allowed_dead_ratio(); \
|
||||
allowed_deadspace = (capacity() * ratio / 100) / HeapWordSize; \
|
||||
} \
|
||||
\
|
||||
|
@ -1079,7 +1079,7 @@ class TenuredSpace: public OffsetTableContigSpace {
|
|||
friend class VMStructs;
|
||||
protected:
|
||||
// Mark sweep support
|
||||
int allowed_dead_ratio() const;
|
||||
size_t allowed_dead_ratio() const;
|
||||
public:
|
||||
// Constructor
|
||||
TenuredSpace(BlockOffsetSharedArray* sharedOffsetArray,
|
||||
|
@ -1094,7 +1094,7 @@ class ContigPermSpace: public OffsetTableContigSpace {
|
|||
friend class VMStructs;
|
||||
protected:
|
||||
// Mark sweep support
|
||||
int allowed_dead_ratio() const;
|
||||
size_t allowed_dead_ratio() const;
|
||||
public:
|
||||
// Constructor
|
||||
ContigPermSpace(BlockOffsetSharedArray* sharedOffsetArray, MemRegion mr) :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue