mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add realloc and freetags tracy zones
This commit is contained in:
parent
28f22e3f71
commit
010d917f16
1 changed files with 7 additions and 0 deletions
|
|
@ -156,6 +156,7 @@ void Z_Free2(void *ptr, const char *file, INT32 line)
|
|||
#endif
|
||||
block->prev->next = block->next;
|
||||
block->next->prev = block->prev;
|
||||
TracyCFree(block);
|
||||
free(block);
|
||||
}
|
||||
|
||||
|
|
@ -350,6 +351,7 @@ void *Z_Realloc2(void *ptr, size_t size, INT32 tag, void *user, INT32 alignbits,
|
|||
void Z_FreeTags(INT32 lowtag, INT32 hightag)
|
||||
{
|
||||
memblock_t *block, *next;
|
||||
TracyCZone(__zone, true);
|
||||
|
||||
Z_CheckHeap(420);
|
||||
for (block = head.next; block != &head; block = next)
|
||||
|
|
@ -358,6 +360,8 @@ void Z_FreeTags(INT32 lowtag, INT32 hightag)
|
|||
if (block->tag >= lowtag && block->tag <= hightag)
|
||||
Z_Free(MEMORY(block));
|
||||
}
|
||||
|
||||
TracyCZoneEnd(__zone);
|
||||
}
|
||||
|
||||
/** Iterates through all memory for a given set of tags.
|
||||
|
|
@ -369,6 +373,7 @@ void Z_FreeTags(INT32 lowtag, INT32 hightag)
|
|||
void Z_IterateTags(INT32 lowtag, INT32 hightag, boolean (*iterfunc)(void *))
|
||||
{
|
||||
memblock_t *block, *next;
|
||||
TracyCZone(__zone, true);
|
||||
|
||||
if (!iterfunc)
|
||||
I_Error("Z_IterateTags: no iterator function was given");
|
||||
|
|
@ -385,6 +390,8 @@ void Z_IterateTags(INT32 lowtag, INT32 hightag, boolean (*iterfunc)(void *))
|
|||
Z_Free(mem);
|
||||
}
|
||||
}
|
||||
|
||||
TracyCZoneEnd(__zone);
|
||||
}
|
||||
|
||||
// -----------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue