>> malloc_cache is a power of the, so a bitwise and with malloc_cache - 1 >> is equivalent to modulo malloc_cache. > > of two, that is. > > Room is reserved for MALLOC_MAXCACHE pointers, but only malloc_cache > are ever used. So doing a modulo malloc_cache is ok.
Ahh, sorry for that. I was thrown by that 256!