MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / addFreeSlot

Function addFreeSlot

TheForceEngine/TFE_Memory/chunkedArray.cpp:223–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221 }
222
223 void addFreeSlot(ChunkedArray* arr, u8* ptr)
224 {
225 if (arr->freeSlotCount + 1 >= arr->freeSlotCapacity)
226 {
227 arr->freeSlotCapacity += FREE_SLOT_STEP;
228 arr->freeSlots = (u8**)region_realloc(arr->region, arr->freeSlots, sizeof(u8*) * arr->freeSlotCapacity);
229 }
230 arr->freeSlots[arr->freeSlotCount] = ptr;
231 arr->freeSlotCount++;
232 }
233
234 s32 getSlotIndex(ChunkedArray* arr, u8* ptr)
235 {

Callers 1

freeToChunkedArrayFunction · 0.85

Calls 1

region_reallocFunction · 0.85

Tested by

no test coverage detected