分页池内存或非分页池内存? (Windows驱动程序开发) [英] Paged pool memory or Nonpaged pool memory ?? (windows driver development)

查看:485
本文介绍了分页池内存或非分页池内存? (Windows驱动程序开发)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Windows驱动程序开发的新手.我只想知道,驱动程序中的全局变量将使用页面缓冲池内存还是非页面缓冲池内存?

I am newbie in windows driver development. I just want to know , a global variable in a driver will use paged pool memory or non paged pool memory ?

感谢和问候

Navaneeth

Navaneeth

推荐答案

取决于.非页面缓冲池应保留给必须保留在RAM中的内存,因此,如果您执行的某些重要操作会受到磁盘操作的内存页面的影响,请使用非页面缓冲.

Depends. The Non paged pool should be reserved for memory that must stay in RAM so if you are doing something critical that would affected by a memory page from disk operation then use non paged.

有关详情,请参见此处.

查看(尽管它讨论的是C ++,而不是C) ),默认情况下,全局变量可以通过#pragma定位在其中.同样在的p22中,我们将了解如何执行此操作.最后,此讨论,在这里我们看到默认情况下该数据段应不可填充.

Looking at this (though it discusses c++ as opposed to C) it would seem that by default the globals can be located in either by #pragma. Also on p22 of this we see how to do this. Finally this discuss here we see that the data segment should be non pagagable by default.

这篇关于分页池内存或非分页池内存? (Windows驱动程序开发)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆