changes to not get memory out of bounds in slabAllocator