mprotect系统调用保护页面边界内的内存区域:
int mprotect(void *addr, size_t len, int prot);
这里len应该是pagesize的倍数.
len
有没有办法只保护几个连续的地址,这些地址没有与页面边界对齐,即len < pagesize?
len < pagesize
c memory protection
c ×1
memory ×1
protection ×1