< prev index next >

src/share/vm/memory/heap.hpp

Print this page
rev 13198 : 8183573: Refactor CodeHeap and AOTCodeHeap to devirtualize hot methods
Reviewed-by: rbackman

@@ -147,16 +147,16 @@
   // Memory allocation
   void* allocate (size_t size); // Allocate 'size' bytes in the code cache or return NULL
   void  deallocate(void* p);    // Deallocate memory
 
   // Attributes
-  char* low_boundary() const                     { return _memory.low_boundary (); }
+  char* low_boundary() const                     { return _memory.low_boundary(); }
   char* high() const                             { return _memory.high(); }
   char* high_boundary() const                    { return _memory.high_boundary(); }
 
-  virtual bool contains(const void* p) const     { return low_boundary() <= p && p < high(); }
-  virtual bool contains_blob(const CodeBlob* blob) const { return low_boundary() <= (char*) blob && (char*) blob < high(); }
+  bool contains(const void* p) const             { return low_boundary() <= p && p < high(); }
+  bool contains_blob(const CodeBlob* blob) const { return contains(blob->code_begin()); }
 
   virtual void* find_start(void* p)     const;   // returns the block containing p or NULL
   virtual CodeBlob* find_blob_unsafe(void* start) const;
   size_t alignment_unit()       const;           // alignment of any block
   size_t alignment_offset()     const;           // offset of first byte of any block, within the enclosing alignment unit
< prev index next >