>The problem is that the C++ containers seem to reallocate memory when stuff is added to them or when they are copied.
Good thing too. Imagine the chaos that would ensue if dynamic containers didn't actually get more memory when they grew and all containers aliased each other.
>Our client does not like this memory reallocation, he thinks it's possibly dangerous and would like us to do something about it.
It sounds like your client is stupid. Clients dictate how the software is to behave and perform, but the inner workings are the decision of the developer based on those requirements and the client typically has no say in the matter. If a client told me to use an array because dynamic memory is possibly dangerous when a binary tree would be vastly superior, I would tell him to mind his own business and leave the programming to someone who actually knows how to do it right.
>What do you do?
Reserve enough memory from the beginning? Or perhaps write an allocator that somehow takes memory from a magic world where all the memory you'll ever need is already allocated and initialized just for you. I'm being sarcastic, but those are actually two realistic solutions. You can reserve memory and avoid reallocations, or you can write a specialized allocator that takes memory from an existing pool.
>Reimplement the STL?
In a production environment, this would be the height of stupidity. Unless you're a vendor of the C++ standard library, of course.
>Is that a practical decision?
Does it sound like a practical solution? Do you have any idea how much work and thought goes into even the "simple" standard containers like std::vector?