Tee
Tee

Reputation: 93

What do the flags SHM_RND of the IPC function shmat mean?

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

Answers (4)

Harshit Rautela
Harshit Rautela

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

user3629249
user3629249

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

PseudoAj
PseudoAj

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

Annapoornima Koppad
Annapoornima Koppad

Reputation: 1466

I am not aware of this answer, but a simple google search yielded this 1.

Upvotes: 0

Related Questions