slab: Use page struct fields instead of casting