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

@ -196,10 +196,14 @@ realloc (void *ptr,
void void
free (void *ptr) free (void *ptr)
{
if G_LIKELY (ptr < (void *)scratch.buf ||
ptr >= (void *)&scratch.buf[sizeof scratch.buf])
{ {
real_free (ptr); real_free (ptr);
track_free (ptr); track_free (ptr);
} }
}
void * void *
aligned_alloc (size_t alignment, aligned_alloc (size_t alignment,