On Mon, Jun 20, 2011 at 22:46, Jason Funk <jasonlf...@gmail.com> wrote: > I have moved my configuration over to shared memory (following > mod_shm_counter as an example) and it conceptually seems to be working. I am > storing a struct in the memory and members that share it's memory (such as > the last mod time of the configuration file) persist over multiple children. > However, when I am loading the configuration file I have to allocate > additional memory. This apparently doesn't get stored in the same shared > memory as it isn't sticking around. How do I dynamically allocate new memory > to the struct that lives in shared memory?
You cannot (portably), you'll have to reserve the extra space when you the allocate the shared memory.