Add the div module, which allows fast division by dynamic values.

This commit is contained in:
David Goldblatt 2017-12-19 17:30:50 -08:00 committed by David Goldblatt
parent 7f1b02e3fa
commit 21f7c13d0b
5 changed files with 129 additions and 1 deletions

View file

@ -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"