93 _tree.verify();
94 _small_blocks.verify();
95 };
96 #endif
97
98 // Returns number of blocks.
99 int count() const {
100 return _small_blocks.count() + _tree.count();
101 }
102
103 // Returns total size, in words, of all elements.
104 size_t total_size() const {
105 return _small_blocks.total_size() + _tree.total_size();
106 }
107
108 // Returns true if empty.
109 bool is_empty() const {
110 return _small_blocks.is_empty() && _tree.is_empty();
111 }
112
113 };
114
115 } // namespace metaspace
116
117 #endif // SHARE_MEMORY_METASPACE_FREEBLOCKS_HPP
|
93 _tree.verify();
94 _small_blocks.verify();
95 };
96 #endif
97
98 // Returns number of blocks.
99 int count() const {
100 return _small_blocks.count() + _tree.count();
101 }
102
103 // Returns total size, in words, of all elements.
104 size_t total_size() const {
105 return _small_blocks.total_size() + _tree.total_size();
106 }
107
108 // Returns true if empty.
109 bool is_empty() const {
110 return _small_blocks.is_empty() && _tree.is_empty();
111 }
112
113 void print_on(outputStream* st) const;
114
115 };
116
117 } // namespace metaspace
118
119 #endif // SHARE_MEMORY_METASPACE_FREEBLOCKS_HPP
|