0

i created some segement of shared memory using <sys/shm.h> <-- im not sure what this thing called.. shared memory?

seems shared memory doesnt like dynamic allocation and vectors
what are some apporaches i could create a 2D array like structure in shared memory?

1
Contributor
1
Reply
2
Views
4 Years
Discussion Span
Last Post by wildplace
0

sloved... for those interested...
you can create another share memory such that the size is rowscolumns
and the way you access the the array(it an single dimension array!) is..
for(i=0; i&lt;rows; i++)
for(j=0;j&lt;columns;j++)
arg[i
columns+j] //arg[i][j]

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.