How to extend the allowed physical memory?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sharon

    How to extend the allowed physical memory?

    I have an application that fails to allocate all its memory on physical memory.
    I have a Windows XP with 2 GByte RAM.

    Can anybody tell me how to configure the allowed physical memory for each
    application in the Windows XP so the application memory allocation will not
    use any of the virtual memory?

    I’m not talking about the .NET framework. I need to configure the Windows
    itself.


    --------
    Thanks
    Sharon
  • Jeffrey Tan[MSFT]

    #2
    RE: How to extend the allowed physical memory?

    Hi Sharon,

    Thanks for your post.

    I think this issue has nothing to do with .Net Framework, so I suggest you
    post such issue in SDK related newsgroup later on. Thanks

    Based on my understanding, you want to allocate a block of memory in RAM
    without paged out to the disk.

    Windows provided a technology named AWE, which allows user applications to
    use up to 64 GB of physical non-paged memory in a 32-bit virtual address
    space on 32-bit platforms, with windowed views to this physical memory from
    within the application's virtual address space.

    More specificly, we use AllocateUserPhy sicalPages to alloc the memory in
    RAM, then use VirtualAlloc to reserve in process Virual memory space, then
    use MapUserPhysical Pages to map the physical memory to the space we
    reserved before. But please note, we have to enable SE_LOCK_MEMORY_ NAME
    privilege before these operations.

    For more information, please refer to:
    "Address Windowing Extensions"

    /address_windowi ng_extensions.a sp
    "AWE Example"

    /awe_example.asp
    "Address Windowing Extensions and Microsoft Windows 2000 Datacenter Server"

    ml/awewindata.asp

    Hope this helps.

    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    Comment

    • Sharon

      #3
      RE: How to extend the allowed physical memory?

      Hi Jeffrey,

      Thank a lot for the inof.

      The trouble is that we have two PC’s with the same exact hardware and the
      same Windows XP. And my same application is running on these two computers,
      on one of them the allocation is all on the physical memory, but on the other
      PC it’s not.

      I need the memory to be all on the physical memory because I passing this
      memory to a frame grabber that need and check that that this memory is
      continuous on the physical memory, so it fails on one of the computer.

      So you see, I think this problem is in some kind of setting of the system
      (Windows XP) and not in the code changing.

      Can you figure out the setting I need to do in order to make the second
      computer work as well?

      -------
      Thanks
      Sharon

      Comment

      • Willy Denoyette [MVP]

        #4
        Re: How to extend the allowed physical memory?


        You can request the system for physical memory by calling
        AllocateUserPhy sicalPages but you should NEVER assume contiguity of the
        physical pages, windows does not collect physical memory, so it can never
        guarantee contiguity of RAM pages returned by AllocateUserPhy sicalPages .

        If it works on one PC and not on another can be caused by differences in HW
        and SW (OS and user applications), differences in load order of applications
        and services, differences in number and type of device drivers and their
        load order, in one word if it works on one PC doesn't mean it will on
        another, it only means that you were lucky (this time).


        Willy.


        "Sharon" <SharonG@newsgr oups.nospam> wrote in message
        news:E736F465-980D-4550-ACA3-D857171CA7EF@mi crosoft.com...[color=blue]
        > Hi Jeffrey,
        >
        > Thank a lot for the inof.
        >
        > The trouble is that we have two PC’s with the same exact hardware and
        > the
        > same Windows XP. And my same application is running on these two
        > computers,
        > on one of them the allocation is all on the physical memory, but on the
        > other
        > PC it’s not.
        >
        > I need the memory to be all on the physical memory because I passing this
        > memory to a frame grabber that need and check that that this memory is
        > continuous on the physical memory, so it fails on one of the computer.
        >
        > So you see, I think this problem is in some kind of setting of the system
        > (Windows XP) and not in the code changing.
        >
        > Can you figure out the setting I need to do in order to make the second
        > computer work as well?
        >
        > -------
        > Thanks
        > Sharon[/color]


        Comment

        • Jeffrey Tan[MSFT]

          #5
          RE: How to extend the allowed physical memory?

          Hi Sharon,

          Thanks for your feedback.

          Yes, I agree with "Willy Denoyette [MVP]". Normally, Windows uses paging to
          implement the virtual memory. Due to the paging, the continuous Virtual
          memory can not be guaranteed to be continuous in RAM.

          If you really want this, I think you have to turn off paging for your
          system.

          Currently, this is not a development issue, I suggest you paste this issue
          in certain Windows OS newsgroup, you will get more useful and professional
          help there. Thanks for your understanding.

          Best regards,
          Jeffrey Tan
          Microsoft Online Partner Support
          Get Secure! - www.microsoft.com/security
          This posting is provided "as is" with no warranties and confers no rights.

          Comment

          Working...