hotspot/src/share/vm/memory/heap.hpp
changeset 46647 634dc786bf96
parent 43945 e7f2e49d2274
equal deleted inserted replaced
46646:5165b3a5b44a 46647:634dc786bf96
   147   // Memory allocation
   147   // Memory allocation
   148   void* allocate (size_t size); // Allocate 'size' bytes in the code cache or return NULL
   148   void* allocate (size_t size); // Allocate 'size' bytes in the code cache or return NULL
   149   void  deallocate(void* p);    // Deallocate memory
   149   void  deallocate(void* p);    // Deallocate memory
   150 
   150 
   151   // Attributes
   151   // Attributes
   152   char* low_boundary() const                     { return _memory.low_boundary (); }
   152   char* low_boundary() const                     { return _memory.low_boundary(); }
   153   char* high() const                             { return _memory.high(); }
   153   char* high() const                             { return _memory.high(); }
   154   char* high_boundary() const                    { return _memory.high_boundary(); }
   154   char* high_boundary() const                    { return _memory.high_boundary(); }
   155 
   155 
   156   virtual bool contains(const void* p) const     { return low_boundary() <= p && p < high(); }
   156   bool contains(const void* p) const             { return low_boundary() <= p && p < high(); }
   157   virtual bool contains_blob(const CodeBlob* blob) const { return low_boundary() <= (char*) blob && (char*) blob < high(); }
   157   bool contains_blob(const CodeBlob* blob) const { return contains(blob->code_begin()); }
   158 
   158 
   159   virtual void* find_start(void* p)     const;   // returns the block containing p or NULL
   159   virtual void* find_start(void* p)     const;   // returns the block containing p or NULL
   160   virtual CodeBlob* find_blob_unsafe(void* start) const;
   160   virtual CodeBlob* find_blob_unsafe(void* start) const;
   161   size_t alignment_unit()       const;           // alignment of any block
   161   size_t alignment_unit()       const;           // alignment of any block
   162   size_t alignment_offset()     const;           // offset of first byte of any block, within the enclosing alignment unit
   162   size_t alignment_offset()     const;           // offset of first byte of any block, within the enclosing alignment unit