Calculating Total Memory Size
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Calculating Total Memory Size

  1. #1
    Join Date
    Dec 2004
    Posts
    22

    Lightbulb Calculating Total Memory Size

    Hi everyone,

    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

    regards
    vamsi.k

  2. #2
    Join Date
    Sep 2004
    Location
    Valence, France
    Posts
    12

    Re: Calculating Total Memory Size

    Hello,
    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 ?
    Thanks !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center