Skip to contentSkip to conversation

SHM_LOCK question

DISCUSSION Badari Pulavarty 2 participants 2 messages Feb 25, 2002 – Feb 26, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I am trying to understand how SHM_LOCK works on 2.4.17. All I can see SHM_LOCKED set in shm_flags. I don't see how it is locking the pages (that are already existing or future pages). Can somebody explain ?

Any help is appreciated.

Thanks,
Badari

#1 lore raw

Hi Badari,

Quoted 4 lines · Badari Pulavarty

I am trying to understand how SHM_LOCK works on 2.4.17. All I can see SHM_LOCKED set in shm_flags. I don't see how it is locking the pages (that are already existing or future pages). Can somebody explain ?

This flag prevents that the pages are written to swap. shmem_writepage honors it. SHM_LOCK does _not_ force actually swapped out pages into memory though.

Greetings
Christoph