summaryrefslogtreecommitdiffstats
path: root/src/sz.c
diff options
context:
space:
mode:
authorDavid Goldblatt <davidgoldblatt@fb.com>2017-12-20 01:30:50 (GMT)
committerDavid Goldblatt <davidtgoldblatt@gmail.com>2017-12-21 22:25:43 (GMT)
commit21f7c13d0b172dac6ea76236bbe0a2f3ee4bcb7b (patch)
tree0b57b8ba7a9946d599adc21070f58983ce59d1f3 /src/sz.c
parent7f1b02e3fa9de7e0bb5e2562994b5ab3b82c0ec3 (diff)
downloadjemalloc-21f7c13d0b172dac6ea76236bbe0a2f3ee4bcb7b.zip
jemalloc-21f7c13d0b172dac6ea76236bbe0a2f3ee4bcb7b.tar.gz
jemalloc-21f7c13d0b172dac6ea76236bbe0a2f3ee4bcb7b.tar.bz2
Add the div module, which allows fast division by dynamic values.
Diffstat (limited to 'src/sz.c')
-rw-r--r--src/sz.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sz.c b/src/sz.c
index 0986615..9de77e4 100644
--- a/src/sz.c
+++ b/src/sz.c
@@ -26,7 +26,8 @@ const size_t sz_index2size_tab[NSIZES] = {
JEMALLOC_ALIGNED(CACHELINE)
const uint8_t sz_size2index_tab[] = {
#if LG_TINY_MIN == 0
-#warning "Dangerous LG_TINY_MIN"
+/* The div module doesn't support division by 1. */
+#error "Unsupported LG_TINY_MIN"
#define S2B_0(i) i,
#elif LG_TINY_MIN == 1
#warning "Dangerous LG_TINY_MIN"