src/share/vm/memory/metachunk.cpp

changeset 4382
e51c9860cf66
parent 4327
eade6b2e4782
child 5007
c23dbf0e8ab7
     1.1 --- a/src/share/vm/memory/metachunk.cpp	Fri Dec 21 10:27:49 2012 -0800
     1.2 +++ b/src/share/vm/memory/metachunk.cpp	Mon Dec 03 15:09:39 2012 -0800
     1.3 @@ -56,6 +56,7 @@
     1.4    assert(chunk_end > chunk_bottom, "Chunk must be too small");
     1.5    chunk->set_end(chunk_end);
     1.6    chunk->set_next(NULL);
     1.7 +  chunk->set_prev(NULL);
     1.8    chunk->set_word_size(word_size);
     1.9  #ifdef ASSERT
    1.10    size_t data_word_size = pointer_delta(chunk_end, chunk_bottom, sizeof(MetaWord));
    1.11 @@ -76,15 +77,15 @@
    1.12  }
    1.13  
    1.14  // _bottom points to the start of the chunk including the overhead.
    1.15 -size_t Metachunk::used_word_size() {
    1.16 +size_t Metachunk::used_word_size() const {
    1.17    return pointer_delta(_top, _bottom, sizeof(MetaWord));
    1.18  }
    1.19  
    1.20 -size_t Metachunk::free_word_size() {
    1.21 +size_t Metachunk::free_word_size() const {
    1.22    return pointer_delta(_end, _top, sizeof(MetaWord));
    1.23  }
    1.24  
    1.25 -size_t Metachunk::capacity_word_size() {
    1.26 +size_t Metachunk::capacity_word_size() const {
    1.27    return pointer_delta(_end, _bottom, sizeof(MetaWord));
    1.28  }
    1.29  
    1.30 @@ -93,6 +94,10 @@
    1.31                 " bottom " PTR_FORMAT " top " PTR_FORMAT
    1.32                 " end " PTR_FORMAT " size " SIZE_FORMAT,
    1.33                 bottom(), top(), end(), word_size());
    1.34 +  if (Verbose) {
    1.35 +    st->print_cr("    used " SIZE_FORMAT " free " SIZE_FORMAT,
    1.36 +                 used_word_size(), free_word_size());
    1.37 +  }
    1.38  }
    1.39  
    1.40  #ifndef PRODUCT

mercurial