src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp

changeset 3732
f69a5d43dc19
parent 2958
1e3493ac2d11
child 4153
b9a9ed0f8eeb
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp	Thu Mar 29 19:46:24 2012 -0700
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp	Wed Apr 25 09:55:55 2012 -0700
     1.3 @@ -75,20 +75,20 @@
     1.4      // calls.  We really want the read of _mark and _prev from this pointer
     1.5      // to be volatile but making the fields volatile causes all sorts of
     1.6      // compilation errors.
     1.7 -    return ((volatile FreeChunk*)addr)->isFree();
     1.8 +    return ((volatile FreeChunk*)addr)->is_free();
     1.9    }
    1.10  
    1.11 -  bool isFree() const volatile {
    1.12 +  bool is_free() const volatile {
    1.13      LP64_ONLY(if (UseCompressedOops) return mark()->is_cms_free_chunk(); else)
    1.14      return (((intptr_t)_prev) & 0x1) == 0x1;
    1.15    }
    1.16    bool cantCoalesce() const {
    1.17 -    assert(isFree(), "can't get coalesce bit on not free");
    1.18 +    assert(is_free(), "can't get coalesce bit on not free");
    1.19      return (((intptr_t)_prev) & 0x2) == 0x2;
    1.20    }
    1.21    void dontCoalesce() {
    1.22      // the block should be free
    1.23 -    assert(isFree(), "Should look like a free block");
    1.24 +    assert(is_free(), "Should look like a free block");
    1.25      _prev = (FreeChunk*)(((intptr_t)_prev) | 0x2);
    1.26    }
    1.27    FreeChunk* prev() const {
    1.28 @@ -103,23 +103,23 @@
    1.29      LP64_ONLY(if (UseCompressedOops) return mark()->get_size(); else )
    1.30      return _size;
    1.31    }
    1.32 -  void setSize(size_t sz) {
    1.33 +  void set_size(size_t sz) {
    1.34      LP64_ONLY(if (UseCompressedOops) set_mark(markOopDesc::set_size_and_free(sz)); else )
    1.35      _size = sz;
    1.36    }
    1.37  
    1.38    FreeChunk* next()   const { return _next; }
    1.39  
    1.40 -  void linkAfter(FreeChunk* ptr) {
    1.41 -    linkNext(ptr);
    1.42 -    if (ptr != NULL) ptr->linkPrev(this);
    1.43 +  void link_after(FreeChunk* ptr) {
    1.44 +    link_next(ptr);
    1.45 +    if (ptr != NULL) ptr->link_prev(this);
    1.46    }
    1.47 -  void linkNext(FreeChunk* ptr) { _next = ptr; }
    1.48 -  void linkPrev(FreeChunk* ptr) {
    1.49 +  void link_next(FreeChunk* ptr) { _next = ptr; }
    1.50 +  void link_prev(FreeChunk* ptr) {
    1.51      LP64_ONLY(if (UseCompressedOops) _prev = ptr; else)
    1.52      _prev = (FreeChunk*)((intptr_t)ptr | 0x1);
    1.53    }
    1.54 -  void clearNext()              { _next = NULL; }
    1.55 +  void clear_next()              { _next = NULL; }
    1.56    void markNotFree() {
    1.57      // Set _prev (klass) to null before (if) clearing the mark word below
    1.58      _prev = NULL;
    1.59 @@ -129,7 +129,7 @@
    1.60        set_mark(markOopDesc::prototype());
    1.61      }
    1.62  #endif
    1.63 -    assert(!isFree(), "Error");
    1.64 +    assert(!is_free(), "Error");
    1.65    }
    1.66  
    1.67    // Return the address past the end of this chunk

mercurial