MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xMemPoolFree

Function xMemPoolFree

src/SB/Core/x/xMemMgr.cpp:468–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468void xMemPoolFree(xMemPool* pool, void* data)
469{
470 void** prev;
471 void* freeList;
472 U32 next;
473 void* curr;
474
475 if (data == NULL)
476 {
477 return;
478 }
479
480 freeList = pool->FreeList;
481 next = pool->NextOffset;
482 if (pool->Flags & 1)
483 {
484 prev = &pool->UsedList;
485 curr = pool->UsedList;
486
487 while (curr != NULL && curr != data)
488 {
489 prev = (void**)((U32)curr + next);
490 curr = *prev;
491 }
492
493 if (curr != NULL)
494 {
495 *prev = *(void**)((U32)curr + next);
496 }
497 }
498
499 *(void**)((U32)data + next) = freeList;
500 pool->FreeList = data;
501}

Callers 4

xAnimPlaySetStateFunction · 0.70
SingleUpdateFunction · 0.70
xAnimPlayStartTransitionFunction · 0.70
xAnimPoolFreeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected