hotspot/src/share/vm/gc/shared/space.hpp
changeset 33205 bc9fec5e7656
parent 30870 3050fdcdc60b
child 33212 906b3d079b13
equal deleted inserted replaced
33203:e1034e5d33eb 33205:bc9fec5e7656
    25 #ifndef SHARE_VM_GC_SHARED_SPACE_HPP
    25 #ifndef SHARE_VM_GC_SHARED_SPACE_HPP
    26 #define SHARE_VM_GC_SHARED_SPACE_HPP
    26 #define SHARE_VM_GC_SHARED_SPACE_HPP
    27 
    27 
    28 #include "gc/shared/blockOffsetTable.hpp"
    28 #include "gc/shared/blockOffsetTable.hpp"
    29 #include "gc/shared/cardTableModRefBS.hpp"
    29 #include "gc/shared/cardTableModRefBS.hpp"
    30 #include "gc/shared/watermark.hpp"
       
    31 #include "gc/shared/workgroup.hpp"
    30 #include "gc/shared/workgroup.hpp"
    32 #include "memory/allocation.hpp"
    31 #include "memory/allocation.hpp"
    33 #include "memory/iterator.hpp"
    32 #include "memory/iterator.hpp"
    34 #include "memory/memRegion.hpp"
    33 #include "memory/memRegion.hpp"
    35 #include "oops/markOop.hpp"
    34 #include "oops/markOop.hpp"
   539   void set_top(HeapWord* value)    { _top = value; }
   538   void set_top(HeapWord* value)    { _top = value; }
   540 
   539 
   541   void set_saved_mark()            { _saved_mark_word = top();    }
   540   void set_saved_mark()            { _saved_mark_word = top();    }
   542   void reset_saved_mark()          { _saved_mark_word = bottom(); }
   541   void reset_saved_mark()          { _saved_mark_word = bottom(); }
   543 
   542 
   544   WaterMark bottom_mark()     { return WaterMark(this, bottom()); }
       
   545   WaterMark top_mark()        { return WaterMark(this, top()); }
       
   546   WaterMark saved_mark()      { return WaterMark(this, saved_mark_word()); }
       
   547   bool saved_mark_at_top() const { return saved_mark_word() == top(); }
   543   bool saved_mark_at_top() const { return saved_mark_word() == top(); }
   548 
   544 
   549   // In debug mode mangle (write it with a particular bit
   545   // In debug mode mangle (write it with a particular bit
   550   // pattern) the unused part of a space.
   546   // pattern) the unused part of a space.
   551 
   547 
   647 #undef ContigSpace_OOP_SINCE_SAVE_MARKS_DECL
   643 #undef ContigSpace_OOP_SINCE_SAVE_MARKS_DECL
   648 
   644 
   649   // Same as object_iterate, but starting from "mark", which is required
   645   // Same as object_iterate, but starting from "mark", which is required
   650   // to denote the start of an object.  Objects allocated by
   646   // to denote the start of an object.  Objects allocated by
   651   // applications of the closure *are* included in the iteration.
   647   // applications of the closure *are* included in the iteration.
   652   virtual void object_iterate_from(WaterMark mark, ObjectClosure* blk);
   648   virtual void object_iterate_from(HeapWord* mark, ObjectClosure* blk);
   653 
   649 
   654   // Very inefficient implementation.
   650   // Very inefficient implementation.
   655   virtual HeapWord* block_start_const(const void* p) const;
   651   virtual HeapWord* block_start_const(const void* p) const;
   656   size_t block_size(const HeapWord* p) const;
   652   size_t block_size(const HeapWord* p) const;
   657   // If a block is in the allocated area, it is an object.
   653   // If a block is in the allocated area, it is an object.