Magazines and Vmem: Extending the Slab Allocator to Many CPUs and Arbitrary Resources