I have a C++ application that allocates shared memory on a Linux system via shmget(2). The data that I store in the shared memory grows periodically, and I\'d like to resize th
It seems for me that you can write your own memory manager for your purpose. The conception is quite simple:
N
bytes;2*N
size;I'm afraid we have nothing more to do with that. This is how std::vector
is implemented. And void *realloc()
in most of cases will return you the pointer to the new block of memory (but not to the extended old block).