Allocating a big amount of memory from driver
Hi.
I want to create a ramdisk driver that will be able to allocate upto 1 Gb of mem. (I have 4 Gb machine).
BUT, Win 2000 has only 256 Mb for non-pageable pool and 470 MB limit for pageable memory pool. I haven't found any information about these values in XP .
I've found the /maxmem=N option for boot.ini that allows me to limit windows to use only N Mb of the RAM. How can I access this, hidden from Windows, RAM from my driver. I know that it's possible since there is a commercial (50$ for copy!) RAMdisk driver from "Cenatek" that does have this option.
Thank you in advance.
[614 byte] By [
sisadmin] at [2007-11-18 0:26:45]

# 1 Re: Allocating a big amount of memory from driver
It is not a good idea to allocate big chunks of non-pageable memory - even if it does not lead to complete resource starvation, it will decrease the system performance significantly. Better off, allocate pageable block and serve all requests to I/O on PASSIVE level allowing paging mechanism to be utilised.
sgenie at 2007-11-9 13:02:20 >

# 2 Re: Allocating a big amount of memory from driver
I think I read that in system threads the bottom 2 GiB becomes available (i.e. it has no user-mode process in it), so perhaps you could allocate there.
# 3 Re: Allocating a big amount of memory from driver
Hi,
try to look here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
(If non-paged pool size is set to zero, the size should be choosen by system)