MemoryPool: add sanity check in case of corrupted heap