mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +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
|
#endif
|
||||||
block->prev->next = block->next;
|
block->prev->next = block->next;
|
||||||
block->next->prev = block->prev;
|
block->next->prev = block->prev;
|
||||||
|
TracyCFree(block);
|
||||||
free(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)
|
void Z_FreeTags(INT32 lowtag, INT32 hightag)
|
||||||
{
|
{
|
||||||
memblock_t *block, *next;
|
memblock_t *block, *next;
|
||||||
|
TracyCZone(__zone, true);
|
||||||
|
|
||||||
Z_CheckHeap(420);
|
Z_CheckHeap(420);
|
||||||
for (block = head.next; block != &head; block = next)
|
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)
|
if (block->tag >= lowtag && block->tag <= hightag)
|
||||||
Z_Free(MEMORY(block));
|
Z_Free(MEMORY(block));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TracyCZoneEnd(__zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Iterates through all memory for a given set of tags.
|
/** 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 *))
|
void Z_IterateTags(INT32 lowtag, INT32 hightag, boolean (*iterfunc)(void *))
|
||||||
{
|
{
|
||||||
memblock_t *block, *next;
|
memblock_t *block, *next;
|
||||||
|
TracyCZone(__zone, true);
|
||||||
|
|
||||||
if (!iterfunc)
|
if (!iterfunc)
|
||||||
I_Error("Z_IterateTags: no iterator function was given");
|
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);
|
Z_Free(mem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TracyCZoneEnd(__zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue