< prev index next >
src/share/vm/memory/binaryTreeDictionary.hpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 139,148 ****
--- 139,149 ----
// on the free list for a node in the tree and is only removed if
// it is the last chunk on the free list.
template <class Chunk_t, class FreeList_t>
class TreeChunk : public Chunk_t {
+ private:
friend class TreeList<Chunk_t, FreeList_t>;
TreeList<Chunk_t, FreeList_t>* _list;
TreeList<Chunk_t, FreeList_t> _embedded_list; // if non-null, this chunk is on _list
static size_t _min_tree_chunk_size;
*** 161,179 ****
Chunk_t* next() const { return Chunk_t::next(); }
Chunk_t* prev() const { return Chunk_t::prev(); }
size_t size() const volatile { return Chunk_t::size(); }
! static size_t min_size() {
! return _min_tree_chunk_size;
! }
// debugging
void verify_tree_chunk_list() const;
void assert_is_mangled() const;
};
template <class Chunk_t, class FreeList_t>
class BinaryTreeDictionary: public FreeBlockDictionary<Chunk_t> {
friend class VMStructs;
size_t _total_size;
--- 162,182 ----
Chunk_t* next() const { return Chunk_t::next(); }
Chunk_t* prev() const { return Chunk_t::prev(); }
size_t size() const volatile { return Chunk_t::size(); }
! static size_t min_size();
// debugging
void verify_tree_chunk_list() const;
void assert_is_mangled() const;
};
+ template <class Chunk_t, class FreeList_t>
+ size_t TreeChunk<Chunk_t, FreeList_t>::_min_tree_chunk_size = sizeof(TreeChunk<Chunk_t, FreeList_t>)/HeapWordSize;
+ template <class Chunk_t, class FreeList_t>
+ size_t TreeChunk<Chunk_t, FreeList_t>::min_size() { return _min_tree_chunk_size; }
template <class Chunk_t, class FreeList_t>
class BinaryTreeDictionary: public FreeBlockDictionary<Chunk_t> {
friend class VMStructs;
size_t _total_size;
< prev index next >