diff src/share/vm/memory/space.hpp @ 438:122d10c82f3f

6765804: GC "dead ratios" should be unsigned Reviewed-by: ysr, tonyp
author jcoomes
date Wed, 29 Oct 2008 06:30:02 -0700
parents 1ee8caae33af
children e9be0e04635a
line wrap: on
line diff
--- a/src/share/vm/memory/space.hpp	Fri Oct 31 10:34:20 2008 -0700
+++ b/src/share/vm/memory/space.hpp	Wed Oct 29 06:30:02 2008 -0700
@@ -421,7 +421,7 @@
 
   // 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 @@
                                                                              \
   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 @@
   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 @@
   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) :