I'm a bit confused on how to implement an allocator for my game engine. I'm currently trying to implement PhysX for the physics in my game and it requires an implementation of an abstract allocator class that they defined. I've only heard of allocators spoken about in a general and abstract way so I'm not sure about how they are precisely implemented.
Now what I'm not so certain is that should a game engine contain multiple different allocators for different aspects of the engine i.e a separate allocator for shaders, textures, physics engine, meshes, etc... and if so, how do you know what asset requires an allocator class for it?
Or do you have one allocator class that allocates memory for any type of object? and if so, how do you know how much memory you'd need for the runtime of your program?
He chooses an arbitrary value of 64 objects to allocate memory for. If you have different types of objects, surely 1 type of object will take more memory than another type so why the arbitrary 64? I'm sure he was using 64 just as a replacement for N. But how do we define N here?