Reputation: 93
I checked the man pages, but they don't explain the RND meaning. I want to know the words the RND stand for. Like SHM_RDONLY stand for read-only.thank you!
Upvotes: 1
Views: 1399
Reputation: 1
SHM_RND (rounding off address to SHMLBA)
void * shmat(int shmid, const void *shmaddr, int shmflg)
If shmaddr is not NULL and SHM_RND is specified in shmflg, the attach is equal to the address of the nearest multiple of SHMLBA (Lower Boundary Address).
Upvotes: 0
Reputation: 16530
the following is an excerpt from the man page for shmat()
If shmaddr isn't NULL and SHM_RND is specified in shmflg, the attach occurs at the address equal to shmaddr rounded down to the nearest mul‐ tiple of SHMLBA. Otherwise shmaddr must be a page-aligned address at which the attach occurs.
Upvotes: 2
Reputation: 5959
It means Round, as this document(on page 64) suggests it rounds down to the nearest page size whenever you OR with this flag.
Upvotes: 1
Reputation: 1466
I am not aware of this answer, but a simple google search yielded this 1.
Upvotes: 0