Click to See Complete Forum and Search --> : Allocating a big amount of memory from driver


sisadmin
December 25th, 2002, 03:06 AM
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.

sgenie
December 28th, 2002, 08:39 PM
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.

DrPizza
December 31st, 2002, 09:11 AM
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.

Alexis Moshinsky
December 31st, 2002, 11:27 AM
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)