I would like to use different instances of an STL custom allocator class to manage different memory spaces, and then be able to specify an allocator instance to an STL container
Perhaps you could code a set of allocator types which contains a static pointing to seperate memory spaces.
Then, when the STL container constructs its allocator, the allocator uses the memory spaceassigned to that allocator.
For simplicity, assume you want to use two memory spaces. Create two allocator types, one for each space. Pass the allocator type to the STL container constructors as required.