C :: How To Store Array Of Structure At Shared Memory
Jan 16, 2014
I have one requirement to store an array of structure at shared memory. Also the shared memory should have one counter to store number of elements in the array.
I tried to look at some placed but didn't find anything relevant.
So my first question, is it possible that we can store two things on same shared memory. And second if not then how to achieve the same?
View 5 Replies
Dec 8, 2014
I am trying to initialize a 2D char array of strings into POSIX shared memory to be shared between 3 other processes. There are plenty of tutorials on how to use a pointer to share a single string or an integer between processes, but I could find no examples on how to initialize 1D or 2D arrays using mmap(). I have posted what I have so far below. It is the first program, which creates the shared memory object and initialize the array char files[20][2][100] with the value files[0][0][0] = '