如果内存访问生成页面错误,在Windows/Linux或任何其他操作系统中是否可以在指令级识别?我想象大约看起来像这样的代码:在Windows/Linux平台上监视内存页面
Buffer *buffer = new Buffer();
...Do something with the buffer...
if(thisProcess.generatedPageFault) {
...Do something...
}
...Do something else with the buffer...
if(thisProcess.generatedPageFault) {
...Do something...
}
嘿。感谢您的信息。是的,我完全同意你需要一个中断服务程序,并且必须将它挂接到适当的中断号。但是,在操作系统上可以做到这一点吗?你提出编写驱动程序的建议是非常合理的,但是你能否指点我一些能够帮助我做到的资源? – 2010-03-05 22:19:38