sctccomm
asked on
Shmget Fail
Hello expert,
I am trying to create a section of share memory using
shmget((key_t)1234, sizeof(struct shared_use_st), 0666 | IPC_CREAT);
it return ok if the size I want to create is around 552 (printf("Size:%d", sizeof(struct shared_use_st));
However shmget() return -1 if the size of the structure is increase to 560.
I do a "free" command on my console and it shows I should have 10.9M free RAM
total used free
mem: 14844 3900 10944
Any suggestion?
I am trying to create a section of share memory using
shmget((key_t)1234, sizeof(struct shared_use_st), 0666 | IPC_CREAT);
it return ok if the size I want to create is around 552 (printf("Size:%d", sizeof(struct shared_use_st));
However shmget() return -1 if the size of the structure is increase to 560.
I do a "free" command on my console and it shows I should have 10.9M free RAM
total used free
mem: 14844 3900 10944
Any suggestion?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.