Fast and scalable memory allocation