1

我知道 mprotect 用于保护整个内存页面。谁能告诉我是否有办法保护和取消单个内存字节?

4

1 回答 1

0

怎么保护?如果您正在寻找针对并发读取/正确的保护,那么您正在寻找 pthread_mutex_t。

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

如评论中所述, mprotect 用于整页。

于 2013-11-24T10:09:23.143 回答