MCPcopy Create free account
hub / github.com/creatale/node-dv / moveBlockToFreeList

Method moveBlockToFreeList

deps/opencv/modules/core/src/alloc.cpp:379–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377 }
378
379 void moveBlockToFreeList( Block* block )
380 {
381 int i = block->binIdx;
382 Block*& freePtr = bins[i][FREE];
383 CV_DbgAssert( block->next->prev == block && block->prev->next == block );
384 if( block != freePtr )
385 {
386 Block*& gcPtr = bins[i][GC];
387 if( gcPtr == block )
388 gcPtr = block->next;
389 if( block->next != block )
390 {
391 block->prev->next = block->next;
392 block->next->prev = block->prev;
393 }
394 block->next = freePtr->next;
395 block->prev = freePtr;
396 freePtr = block->next->prev = block->prev->next = block;
397 }
398 }
399
400 Block* bins[MAX_BIN+1][3];
401

Callers 2

fastMallocFunction · 0.80
fastFreeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected