src/share/vm/memory/metachunk.hpp

changeset 5007
c23dbf0e8ab7
parent 4382
e51c9860cf66
child 5941
bdfbb1fb19ca
     1.1 --- a/src/share/vm/memory/metachunk.hpp	Thu Apr 18 06:50:35 2013 +0200
     1.2 +++ b/src/share/vm/memory/metachunk.hpp	Fri Mar 01 10:19:29 2013 -0800
     1.3 @@ -41,10 +41,13 @@
     1.4  //            |              |              |        |
     1.5  //            +--------------+ <- bottom ---+     ---+
     1.6  
     1.7 +class VirtualSpaceNode;
     1.8 +
     1.9  class Metachunk VALUE_OBJ_CLASS_SPEC {
    1.10    // link to support lists of chunks
    1.11    Metachunk* _next;
    1.12    Metachunk* _prev;
    1.13 +  VirtualSpaceNode* _container;
    1.14  
    1.15    MetaWord* _bottom;
    1.16    MetaWord* _end;
    1.17 @@ -61,29 +64,20 @@
    1.18    // the space.
    1.19    static size_t _overhead;
    1.20  
    1.21 -  void set_bottom(MetaWord* v) { _bottom = v; }
    1.22 -  void set_end(MetaWord* v) { _end = v; }
    1.23 -  void set_top(MetaWord* v) { _top = v; }
    1.24 -  void set_word_size(size_t v) { _word_size = v; }
    1.25   public:
    1.26 -#ifdef ASSERT
    1.27 -  Metachunk() : _bottom(NULL), _end(NULL), _top(NULL), _is_free(false),
    1.28 -    _next(NULL), _prev(NULL) {}
    1.29 -#else
    1.30 -  Metachunk() : _bottom(NULL), _end(NULL), _top(NULL),
    1.31 -    _next(NULL), _prev(NULL) {}
    1.32 -#endif
    1.33 +  Metachunk(size_t word_size , VirtualSpaceNode* container);
    1.34  
    1.35    // Used to add a Metachunk to a list of Metachunks
    1.36    void set_next(Metachunk* v) { _next = v; assert(v != this, "Boom");}
    1.37    void set_prev(Metachunk* v) { _prev = v; assert(v != this, "Boom");}
    1.38 +  void set_container(VirtualSpaceNode* v) { _container = v; }
    1.39  
    1.40    MetaWord* allocate(size_t word_size);
    1.41 -  static Metachunk* initialize(MetaWord* ptr, size_t word_size);
    1.42  
    1.43    // Accessors
    1.44    Metachunk* next() const { return _next; }
    1.45    Metachunk* prev() const { return _prev; }
    1.46 +  VirtualSpaceNode* container() const { return _container; }
    1.47    MetaWord* bottom() const { return _bottom; }
    1.48    MetaWord* end() const { return _end; }
    1.49    MetaWord* top() const { return _top; }

mercurial