Memory Allocation problem

Page 1 of 2 12 LastLast

  1. Posts : 4
    Windows 7 Professional 64 bit
       #1

    Memory Allocation problem


    Hi all,

    my pc has 8 GByte Ram but when i try to allocate 128 megabyte contiguous memory in a driver has a difficulty. It succeeds after 4 or 5 restarts? Why this? I have a lot of memory available.
      My Computer


  2. Posts : 983
    7 x64
       #2

    You'll need to explain what you are doing and why a little better.
      My Computer


  3. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #3

    I'm like edwar and don't understand what you are trying to do. I don't understand the worry about 128 mb of ram.
    If you want to see what windows is doing with your ram got to Resource Monitor and tick ram at the top of the page. Windows 7 will take care of how your ram is use with no problems.
    Memory Allocation problem-resource-monitor-ram.png
      My Computer


  4. Posts : 4
    Windows 7 Professional 64 bit
    Thread Starter
       #4

    Ok . I will explain better. I have a driver for a pcie card which tries to allocate 128 MB of memory when widnows 7 start. I use the MmallocateContiguousMemorySpecifyCache() routine for this reason. I see that when i use the optional parameter BoundaryAddressMultiple of the routine which is something that i really need it does the allocation after 4 or 5 restarts of the pc. When i do not use this parameter it does the allocation from the first time. Why?I have 8 GB memory and i can not understand the reason for the multiple restarts.
      My Computer


  5. Posts : 983
    7 x64
       #5

    If you have a PCIe card shouldn't there be drivers for that Add-On card that takes care of allocating whatever system resources it needs to work properly? Why are you trying to override what the drivers and or card software is trying to do?
      My Computer


  6. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #6

    I'm just curious so bear with me. What is the problem with letting Windows 7 allocate ram to what ever it wants to? I don't know why it takes so many boots. I'm trying to understand what problem you are trying to solve with this 128 mgs of ram. You say you really need to do this so I'm guessing you are having a problem. If we know the problem surely their/there will be somebody here that can help. Like I say I'm just curious. Edwar you type fast.
      My Computer


  7. Posts : 4
    Windows 7 Professional 64 bit
    Thread Starter
       #7

    I must use that parameter(BoundaryAddress) because some transfers of data must be done and in other case the address translation will be wrong and the data will lost.
    Last edited by diama13; 14 Oct 2012 at 03:17.
      My Computer


  8. Posts : 983
    7 x64
       #8

    diama13 said:
    I have built the driver so i need to use this routine. I must use that parameter(BoundaryAddress) because some transfers of data must be done and in other case the address translation will be wrong and the data will lost.
    Sorry that makes no sense to me. If this card you have installed is a Name Brand card it should come with the proper drivers and software to make it work correctly. Why are you Building a Driver for it.

    What is the Make and model of this card?

    If the included drivers and software isn't functioning correctly contact the maker of the card for updated software.
      My Computer


  9. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #9

    diama13 thanks for answering my question. I must say it wasn't the answer I expected. I surly can't help you build a driver. Your the first person that I know that can build their/there own drivers. Could we go a little farther? What problems are you having that you have to build your own driver? We mostly do two things on this site, help people and learn ourself. To do these things we really need to know the problem you are trying to solve. What isn't working properly? Your movie watching, Windows functions, Internet displays, Youtube ect.?
      My Computer


  10. Posts : 2,468
    Windows 7 Ultimate x64
       #10

    Maybe it's due to you asking too much memory and the requirements. Even though you have 8GB, demanding 128MB to be contigous, available in physical memory and not placed without crossing any 128MB boundary seems too much for your system. If it succeeds "sometimes" it may be due the loading order (if something else memory hungry claims the memory before) or some other program loading and fragmenting the memory so that it can't be continuous.

    BTW, I also think that the question is too technical for SF . Driver programming is one of the most complex things in computing so I would ask at a specialized forum instead. Try at StackOverflow, that forum is dedicated to programming and one of the best sources of info in the topic.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:22.
Find Us