From fb825dde098bbc5c7eaf592eb29ce33a76b0c1ce Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Fri, 28 Jun 2019 16:56:35 +0100 Subject: [PATCH] Add an assert. --- src/mem/alloc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mem/alloc.h b/src/mem/alloc.h index dbccb96..8d4f181 100644 --- a/src/mem/alloc.h +++ b/src/mem/alloc.h @@ -1021,6 +1021,7 @@ namespace snmalloc stats().sizeclass_alloc(sizeclass); + assert(sizeclass < NUM_SMALL_CLASSES); auto& fl = small_fast_free_lists[sizeclass]; auto head = fl.value; if (likely((reinterpret_cast(head) & 1) == 0))