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

changeset 2071
be3f9c242c9d
parent 1934
e9ff18c4ace7
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Sat Aug 14 00:47:52 2010 -0700
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Mon Aug 16 15:58:42 2010 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -48,6 +48,8 @@
    1.11    size_t    _word_size;
    1.12    size_t    _refillSize;
    1.13    size_t    _allocation_size_limit;  // largest size that will be allocated
    1.14 +
    1.15 +  void print_on(outputStream* st) const;
    1.16  };
    1.17  
    1.18  // Concrete subclass of CompactibleSpace that implements
    1.19 @@ -249,10 +251,14 @@
    1.20    size_t     numFreeBlocksInIndexedFreeLists() const;
    1.21    // Accessor
    1.22    HeapWord* unallocated_block() const {
    1.23 -    HeapWord* ub = _bt.unallocated_block();
    1.24 -    assert(ub >= bottom() &&
    1.25 -           ub <= end(), "space invariant");
    1.26 -    return ub;
    1.27 +    if (BlockOffsetArrayUseUnallocatedBlock) {
    1.28 +      HeapWord* ub = _bt.unallocated_block();
    1.29 +      assert(ub >= bottom() &&
    1.30 +             ub <= end(), "space invariant");
    1.31 +      return ub;
    1.32 +    } else {
    1.33 +      return end();
    1.34 +    }
    1.35    }
    1.36    void freed(HeapWord* start, size_t size) {
    1.37      _bt.freed(start, size);
    1.38 @@ -476,6 +482,7 @@
    1.39  
    1.40    // Debugging support
    1.41    void print()                            const;
    1.42 +  void print_on(outputStream* st)         const;
    1.43    void prepare_for_verify();
    1.44    void verify(bool allow_dirty)           const;
    1.45    void verifyFreeLists()                  const PRODUCT_RETURN;

mercurial