Locking pages

Hi

My system has a RAM of 384MB. I am allocating memory from the non paged
pool and I want to know that how much of memory can be allocated
continuously(without freeing it) with the amount of RAM I have. So this
question amounts to asking “How much memory can be locked by a driver
with a RAM of 384 MB?” Assume that my driver is only other important
process running besides the system files. I am running Windows XP(pro)
SP1.

Does increasing the VM (swapfile or pagefile) increase the amount of
memory that can be allocated? How would the situation change if I increase
the nonpage pool size settings in the registry? I think that the latter
would give me more memory to lock but the former wont help. Correct me if
I am wrong.

Lastly I am a little bit confused about the term “Commit charge” and the
calculations of memory in the Task manager. Is my calculation correct?

Commit charge(total)=Physical memory(total)+pagefile size

What is the “system cache” entity in the taskmanager?

It would be a great help if someone could answer me the above questions.

Regards

Thus spake Arijit Bhattacharyya :

> My system has a RAM of 384MB. I am allocating memory from the non paged
> pool and I want to know that how much of memory can be allocated
> continuously(without freeing it) with the amount of RAM I have. So this
> question amounts to asking “How much memory can be locked by a driver
> with a RAM of 384 MB?” Assume that my driver is only other important
> process running besides the system files. I am running Windows XP(pro)

I’m a very beginner in driver development, but probably can help you.
My system has 2G RAM.
AllocateCommonBuffer(), MmAllocateContiguousMemorySpecifyCache() can
allocate about 1G, but they are terribly slow! 10…20 minutes on a 1.8GHz
Celeron. The mouse pointer freezes meanwhile.
The current solution is: MmAllocatePagesForMdl()
It’s fast, and can allocate more than 1.5G! Haven’t tried the final limit.
Unfortunately, not physically continuous, but locked.


Valenta Ferenc Visit me at http://ludens.elte.h u/~vf/
“My love is REAL, unless declared INTEGER.”