Andres Freund <and...@anarazel.de> writes: > I just noticed that having a slab context around in an assertion build > leads to performance degrading and memory usage going up. A bit of > poking revealed that SlabCheck() doesn't free the freechunks it > allocates.
> It's on its own obviously trivial to fix. It seems like having a context check function do new allocations is something to be avoided in the first place. It's basically assuming that the memory management mechanism is sane, which makes the whole thing fundamentally circular, even if it's relying on some other context to be sane. Is there a way to do the checking without extra allocations? regards, tom lane