Containers store objects of arbitrary types. Containers are parametrized by allocators. Allocators are objects which encapsulate information about the memory model used. They provide memory primitives to handle memory accesses uniformly. Every memory model has its characteristic, tailor-made allocator.
Containers use allocators to do their memory accesses.
A change of the memory model used leads to a change of the allocator object given as an argument to the container. This means, that on the code level a container object is invariant under different memory models. An algorithm is a computation order. So, two algorithms should differ in the computations done by them, not in the access method used to read input data and write output data. This can be achieved when data is accessed in a uniform manner.