memory-collector: avoid tracking scratch memory free

This commit is contained in:
Christian Hergert
2020-07-02 15:20:34 -07:00
committed by Philip Withnall
parent 03326e82fa
commit 760805c8b9

View File

@ -197,8 +197,12 @@ realloc (void *ptr,
void
free (void *ptr)
{
real_free (ptr);
track_free (ptr);
if G_LIKELY (ptr < (void *)scratch.buf ||
ptr >= (void *)&scratch.buf[sizeof scratch.buf])
{
real_free (ptr);
track_free (ptr);
}
}
void *