diff src/share/vm/gc_interface/collectedHeap.hpp @ 4708:3c648b9ad052

7121373: Clean up CollectedHeap::is_in Summary: Fixed G1CollectedHeap::is_in, added tests, cleaned up comments and made Space::is_in pure virtual. Reviewed-by: brutisso, tonyp, jcoomes
author stefank
date Wed, 14 Dec 2011 12:15:26 +0100
parents 53074c2c4600
children 441e946dc1af
line wrap: on
line diff
--- a/src/share/vm/gc_interface/collectedHeap.hpp	Fri Dec 09 19:28:34 2011 -0800
+++ b/src/share/vm/gc_interface/collectedHeap.hpp	Wed Dec 14 12:15:26 2011 +0100
@@ -217,8 +217,8 @@
     return p == NULL || is_in_reserved(p);
   }
 
-  // Returns "TRUE" if "p" points to the head of an allocated object in the
-  // heap. Since this method can be expensive in general, we restrict its
+  // Returns "TRUE" iff "p" points into the committed areas of the heap.
+  // Since this method can be expensive in general, we restrict its
   // use to assertion checking only.
   virtual bool is_in(const void* p) const = 0;
 
@@ -648,6 +648,10 @@
   // reduce the occurrence of ParallelGCThreads to uses where the
   // actual number may be germane.
   static bool use_parallel_gc_threads() { return ParallelGCThreads > 0; }
+
+  /////////////// Unit tests ///////////////
+
+  NOT_PRODUCT(static void test_is_in();)
 };
 
 // Class to set and reset the GC cause for a CollectedHeap.