New
#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.
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.
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.
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?
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.
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.
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.
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.?
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.