如果我将页面映射为只写:
int* mem_location = (int*)mmap(nullptr, getpagesize(),
PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
cout << "Read @" << mem_location << ". This should segfault: "
<< *mem_location << endl;
cout << "doesn't though??" << endl;
为什么不读取段错误?