One way is to have a memory pool declared in data segment and have your own memory allocation function.
char myMemoryPool[10000000]; // global variable (can be enclosed in namespace)
And you have to write your own memory manager:
void* MyMemoryAlloc (size_t SIZE){ //... use SIZE}
Usage:
A* p = (A*)MyMemoryAlloc(sizeof(A) * 3);
Or more precisely,
template<typename T>T* MyMemoryAlloc (unsigned int UNITS){//... use (sizeof(A) * UNITS)}
Usage:
A *p = MyMemoryAlloc<A>(3);