Lines Matching refs:ChunkPool

170 // ChunkPool implementation
174 class ChunkPool: public CHeapObj<mtInternal> {
181 static ChunkPool* _large_pool;
182 static ChunkPool* _medium_pool;
183 static ChunkPool* _small_pool;
196 // All chunks in a ChunkPool has the same size
197 ChunkPool(size_t size) : _size(size) { _first = NULL; _num_chunks = _num_used = 0; }
211 vm_exit_out_of_memory(bytes, "ChunkPool::allocate");
260 static ChunkPool* large_pool() { assert(_large_pool != NULL, "must be initialized"); return _large_pool; }
261 static ChunkPool* medium_pool() { assert(_medium_pool != NULL, "must be initialized"); return _medium_pool; }
262 static ChunkPool* small_pool() { assert(_small_pool != NULL, "must be initialized"); return _small_pool; }
265 _large_pool = new ChunkPool(Chunk::size + Chunk::aligned_overhead_size());
266 _medium_pool = new ChunkPool(Chunk::medium_size + Chunk::aligned_overhead_size());
267 _small_pool = new ChunkPool(Chunk::init_size + Chunk::aligned_overhead_size());
278 ChunkPool* ChunkPool::_large_pool = NULL;
279 ChunkPool* ChunkPool::_medium_pool = NULL;
280 ChunkPool* ChunkPool::_small_pool = NULL;
283 ChunkPool::initialize();
288 ChunkPool::clean();
302 ChunkPool::clean();
317 case Chunk::size: return ChunkPool::large_pool()->allocate(bytes, alloc_failmode);
318 case Chunk::medium_size: return ChunkPool::medium_pool()->allocate(bytes, alloc_failmode);
319 case Chunk::init_size: return ChunkPool::small_pool()->allocate(bytes, alloc_failmode);
333 case Chunk::size: ChunkPool::large_pool()->free(c); break;
334 case Chunk::medium_size: ChunkPool::medium_pool()->free(c); break;
335 case Chunk::init_size: ChunkPool::small_pool()->free(c); break;