shmat problem
Hi all
I have a problem with the shmat() function. It works correctly when one doesn't specify an address where the segment should be attached, but fails when one does. To specify an address it must be alligned and I did by using __attribute__ (aligned()). Still the function fails. What is the most effective way for a solution
to this problem.
Thanks
Dirk
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
Quoted 6 lines · Dirk Bull
I have a problem with the
shmat()function. It works correctly when one doesn't specify an address where the segment should be attached, but fails when one does. To specify an address it must be alligned and I did by using__attribute__(aligned()). Still the function fails. What is the most effective way for a solution
to this problem.
__attribute__(aligned()) has nothing to do with it--the address needs to be page-aligned (ie on a multiple of 4K for ix86), unless SHM_RND is set in the call. You also need to make sure nothing else is mapped at the address you're trying to use...
-Doug