Home | History | Annotate | Download | only in core

Lines Matching refs:block

18     the list creates the objects and they are deleted upon removal. This class block-allocates
32 struct Block;
36 Block* fBlock; // owning block.
44 // all the nodes in the pre-allocated first block need to be inserted into the free list. This
54 Block* block = node->fBlock;
56 if (0 == --block->fNodesInUse) {
58 block->fNodes[i].~Node();
60 if (block != &fFirstBlock) {
61 sk_free(block);
220 struct Block {
246 // block.
248 Block* block = reinterpret_cast<Block*>(sk_malloc_throw(sizeof(Block)));
249 node = &block->fNodes[0];
251 node->fBlock = block;
252 block->fNodesInUse = 1;
254 new (block->fNodes + i) Node;
255 fFreeList.addToHead(block->fNodes + i);
256 block->fNodes[i].fBlock = block;
267 Block* block = node->fBlock;
268 // Don't ever elease the first block, just add its nodes to the free list
269 if (0 == --block->fNodesInUse && block != &fFirstBlock) {
271 if (block->fNodes + i != node) {
272 fFreeList.remove(block->fNodes + i);
274 block->fNodes[i].~Node();
276 sk_free(block);
292 // Should only have the nodes from the first block in the free list.
303 Block* block = freeNode->fBlock;
304 // Only the first block is allowed to have all its nodes in the free list.
305 SkASSERT(block->fNodesInUse > 0 || block == &fFirstBlock);
306 SkASSERT((unsigned)block->fNodesInUse < N);
310 bool free = fFreeList.isInList(block->fNodes + i);
311 bool active = fList.isInList(block->fNodes + i);
316 SkASSERT(activeCnt == block->fNodesInUse);
325 Block* block = activeNode->fBlock;
326 SkASSERT(block->fNodesInUse > 0 && (unsigned)block->fNodesInUse <= N);
331 bool free = fFreeList.isInList(block->fNodes + i);
332 bool active = fList.isInList(block->fNodes + i);
337 SkASSERT(activeCnt == block->fNodesInUse);
346 Block fFirstBlock;