Fix mi_page_is_used_at_frac for pages that have few allocatable blocks
diff --git a/include/mimalloc/internal.h b/include/mimalloc/internal.h index 5b766d7..7dd154c 100644 --- a/include/mimalloc/internal.h +++ b/include/mimalloc/internal.h
@@ -697,6 +697,7 @@ // is more than (n-1)/n'th of a page in use? static inline bool mi_page_is_used_at_frac(const mi_page_t* page, uint16_t n) { if (page==NULL) return true; + if (page->reserved < n) return false; uint16_t frac = page->reserved / n; return (page->reserved - page->used <= frac); }