February 19th, 2005, 01:20 AM
Calculating Total Memory Size
how to claculate Total RAM size using DDk calls (in windows nt/ 2000).
In my Boot.ini file i restricted the operating system memory size using /Maxmem option.
for example system is having 3GB memory i restricted the operating system size for 1GB.the remaining 2GB memory is for my Continuous DMA Purpose.but my problem is if i want to calculate total memory size using ddk call (for 3GB RAM).
can any one plz suggest me about this issue and how to solve this issue
February 24th, 2005, 04:36 AM
Re: Calculating Total Memory Size
I do not know how to calculate the size of the memory left but I would like to know how you allocate non paged contiguous memory for your DMA purpose ? Do you use the AllocateCommonBuffer function ? In such a case, I made some tests on a Windows XP architecture (with 2GB of physical memory). In fact, in the boot.ini file, I set the option /maxmem=xxxx where xxxx started from 2048 downto 256. For each value of maxmem, I tried, in my driver at START_DEVICE, to allocate 200 Mbytes of non paged contiguous memory. It succeeded for each maxmem size except for 256 in which Windows returned a NULL pointer at the call of AllocateCommonBuffer. So, I am wondering how the memory after the maxmem limit is managed ? It seems that when allocating DMA purpose memory, Windows uses the memory below the maxmem limit I set, not the upper memory. In fact how does it work ?
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.