shared memory in c

Hi everybody.
I have a question of something that I have been trying lately in the C language. I want to use shared memory in a c program but it seems that the segment size it isn't bigenough for the structure i want to share with the other program. In the examples I saw in the web, they used the function shmget(key, size , IPC_CREAT | 0666) with size=27. When i increase that value to sizeof (Mystruct) ,the code don't compile.
Does anyone knows if there is a maximum size for a shared memory segment?


What's the error message?
It's a segmentation fault
Huh? But...
When i increase that value to sizeof (Mystruct) ,the code don't compile.
How can you be getting a segmentation fault if the program doesn't compile?
Topic archived. No new replies allowed.