From 5fb8db3e7d5f0160b80d6287e48f8061b902a278 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 16 Nov 2019 12:25:40 -0800 Subject: sparkler: remove assert from chunker_free_chunker() This assert prevents using the chunker for efficient freeing, maybe in the future add a flag for toggling this but for now it can just be commented out. --- src/modules/sparkler/chunker.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules') diff --git a/src/modules/sparkler/chunker.c b/src/modules/sparkler/chunker.c index ca072eb..96dd911 100644 --- a/src/modules/sparkler/chunker.c +++ b/src/modules/sparkler/chunker.c @@ -192,7 +192,13 @@ void chunker_free_chunker(chunker_t *chunker) chunk_unref(chunker->chunk); } +/* + It can be useful to police this, but part of the value of the chunker + is to be able to perform a bulk cleanup without first performing heaps + of granular frees. Maybe enforcing this should be requestable via a + parameter. assert(list_empty(&chunker->pinned_chunks)); +*/ list_for_each_entry_safe(chunk, _chunk, &chunker->free_chunks, chunks) { free(chunk); -- cgit v1.2.1