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

changeset 3730
9f059abe8cf2
parent 3711
b632e80fc9dc
child 3732
f69a5d43dc19
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Fri Apr 20 17:13:36 2012 -0700
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Thu Mar 29 19:46:24 2012 -0700
     1.3 @@ -25,10 +25,10 @@
     1.4  #ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_COMPACTIBLEFREELISTSPACE_HPP
     1.5  #define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_COMPACTIBLEFREELISTSPACE_HPP
     1.6  
     1.7 -#include "gc_implementation/concurrentMarkSweep/binaryTreeDictionary.hpp"
     1.8 -#include "gc_implementation/concurrentMarkSweep/freeList.hpp"
     1.9  #include "gc_implementation/concurrentMarkSweep/promotionInfo.hpp"
    1.10 +#include "memory/binaryTreeDictionary.hpp"
    1.11  #include "memory/blockOffsetTable.inline.hpp"
    1.12 +#include "memory/freeList.hpp"
    1.13  #include "memory/space.hpp"
    1.14  
    1.15  // Classes in support of keeping track of promotions into a non-Contiguous
    1.16 @@ -129,10 +129,10 @@
    1.17    // Linear allocation blocks
    1.18    LinearAllocBlock _smallLinearAllocBlock;
    1.19  
    1.20 -  FreeBlockDictionary::DictionaryChoice _dictionaryChoice;
    1.21 -  FreeBlockDictionary* _dictionary;    // ptr to dictionary for large size blocks
    1.22 +  FreeBlockDictionary<FreeChunk>::DictionaryChoice _dictionaryChoice;
    1.23 +  FreeBlockDictionary<FreeChunk>* _dictionary;    // ptr to dictionary for large size blocks
    1.24  
    1.25 -  FreeList _indexedFreeList[IndexSetSize];
    1.26 +  FreeList<FreeChunk> _indexedFreeList[IndexSetSize];
    1.27                                         // indexed array for small size blocks
    1.28    // allocation stategy
    1.29    bool       _fitStrategy;      // Use best fit strategy.
    1.30 @@ -169,7 +169,7 @@
    1.31    // If the count of "fl" is negative, it's absolute value indicates a
    1.32    // number of free chunks that had been previously "borrowed" from global
    1.33    // list of size "word_sz", and must now be decremented.
    1.34 -  void par_get_chunk_of_blocks(size_t word_sz, size_t n, FreeList* fl);
    1.35 +  void par_get_chunk_of_blocks(size_t word_sz, size_t n, FreeList<FreeChunk>* fl);
    1.36  
    1.37    // Allocation helper functions
    1.38    // Allocate using a strategy that takes from the indexed free lists
    1.39 @@ -215,7 +215,7 @@
    1.40    // and return it.  The split off remainder is returned to
    1.41    // the free lists.  The old name for getFromListGreater
    1.42    // was lookInListGreater.
    1.43 -  FreeChunk* getFromListGreater(FreeList* fl, size_t numWords);
    1.44 +  FreeChunk* getFromListGreater(FreeList<FreeChunk>* fl, size_t numWords);
    1.45    // Get a chunk in the indexed free list or dictionary,
    1.46    // by considering a larger chunk and splitting it.
    1.47    FreeChunk* getChunkFromGreater(size_t numWords);
    1.48 @@ -286,10 +286,10 @@
    1.49    // Constructor...
    1.50    CompactibleFreeListSpace(BlockOffsetSharedArray* bs, MemRegion mr,
    1.51                             bool use_adaptive_freelists,
    1.52 -                           FreeBlockDictionary::DictionaryChoice);
    1.53 +                           FreeBlockDictionary<FreeChunk>::DictionaryChoice);
    1.54    // accessors
    1.55    bool bestFitFirst() { return _fitStrategy == FreeBlockBestFitFirst; }
    1.56 -  FreeBlockDictionary* dictionary() const { return _dictionary; }
    1.57 +  FreeBlockDictionary<FreeChunk>* dictionary() const { return _dictionary; }
    1.58    HeapWord* nearLargestChunk() const { return _nearLargestChunk; }
    1.59    void set_nearLargestChunk(HeapWord* v) { _nearLargestChunk = v; }
    1.60  
    1.61 @@ -622,7 +622,7 @@
    1.62    CompactibleFreeListSpace* _cfls;
    1.63  
    1.64    // Our local free lists.
    1.65 -  FreeList _indexedFreeList[CompactibleFreeListSpace::IndexSetSize];
    1.66 +  FreeList<FreeChunk> _indexedFreeList[CompactibleFreeListSpace::IndexSetSize];
    1.67  
    1.68    // Initialized from a command-line arg.
    1.69  
    1.70 @@ -635,7 +635,7 @@
    1.71    size_t        _num_blocks        [CompactibleFreeListSpace::IndexSetSize];
    1.72  
    1.73    // Internal work method
    1.74 -  void get_from_global_pool(size_t word_sz, FreeList* fl);
    1.75 +  void get_from_global_pool(size_t word_sz, FreeList<FreeChunk>* fl);
    1.76  
    1.77  public:
    1.78    CFLS_LAB(CompactibleFreeListSpace* cfls);

mercurial