分页池内存或非分页池内存? (Windows驱动程序开发) [英] Paged pool memory or Nonpaged pool memory ?? (windows driver development)
问题描述
我是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屋!