summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2019-11-16 12:25:40 -0800
committerVito Caputo <vcaputo@pengaru.com>2019-11-16 12:25:40 -0800
commit5fb8db3e7d5f0160b80d6287e48f8061b902a278 (patch)
tree617e560aa9803c7596c3b4dacf9e5c05fbdeaea1 /src
parent990153e7c5f9c6f3adc3781f9cb5588258ab36c7 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/modules/sparkler/chunker.c6
1 files changed, 6 insertions, 0 deletions
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);
© All Rights Reserved