1

I know that mprotect is used to protect a whole memory page. Can anyone please tell me if there is a way to protect and unportect a single memory byte?

Muhammad Razib
  • 1,297
  • 9
  • 13

1 Answers1

0

Protect how? If you are looking for protection against concurrent reads/right a pthread_mutex_t is what you are looking for.

http://www.sourceware.org/pthreads-win32/manual/pthread_mutex_init.html

As mentioned in the comments, mprotect is used for full pages.

It'sPete
  • 5,083
  • 8
  • 39
  • 72