Hi,

I am new to Shared memory functionality. I have a question related to grow().

1. For growing a memory we need to first un-map the memory and then map it again. Suppose before un-map base address of shared memory is X then after growing will the base address be changed or extra segment of memory will be added to existing memory keeping base address same?

More specifically, will the entire memory (original + extra grow memory) be reallocated as one chunk or mere addition of an extra chunk is done?

2. If entire memory (original + extra grow memory) is reallocated after growing then how to manage previously allocated memory that is the shared memory which was being used before grow was called (original)? Does grow takes care of deleting it?

   By posing this query I am more concerned about memory leaks. Please help.

Thanks