Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Contiguous Memory allocation

Reply
Thread Tools Display Modes

Contiguous Memory allocation

 
 
Bhentai
Guest
Posts: n/a

 
      12-07-2009
Hi,

I want to allocate a certain memory area in RAM using the
MmAllocateContiguousMemorySpecifyCache function. I've put my boundaries for
my lowest and highest acceptable values and I want to get all the the
availeble space between those values. For Example:

MmAllocateContiguousMemorySpecifyCache(
0x4000, //diff between highest and lowest acceptable
0x44000, //lowest acceptable
0x48001, //highest acceptable
0, // boundary address multiple
MmNonCached); //cache type

I was able to get a return pointer corresponding to the virtual address
value but if I call MmGetPhysicalAddress with my previously returned value, I
get a physical address of 0x45000, following my example. So this would mean
that my complete buffer would range between 0x45000 and 0x49000 if it was
allocated correctly, and this does not respect the previoulsy entered
acceptable ranged values in MmAllocateContiguousMemorySpecifyCache. What is
wrong with my setup and why is MmAllocateContiguousMemorySpecifyCache
behaving like that?

Regards
 
Reply With Quote
 
 
 
 
Junior Member
Join Date: Dec 2009
Posts: 1

 
      12-07-2009
I'm having the same problem, for the same address range!
Could you tell me if you found out a solution?
Thanks
 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      12-08-2009
> I was able to get a return pointer corresponding to the virtual address
> value but if I call MmGetPhysicalAddress


Use ->AllocateCommonBuffer instead, this is a more supported way.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to save files on memory stick - keep getting Error 0x800700 Bootsja Windows Vista File Management 15 12-07-2009 02:17 AM
Vista 64 - pci.sys cannot allocate PCI bar above 4 gig area Pat Windows Vista Drivers 6 10-30-2009 02:28 AM
trouble with new ram Computer & Sound System Tech Windows Vista Hardware 43 11-12-2007 10:57 AM
Office with Vista Tommo Windows Vista Installation 3 03-04-2007 10:25 PM
Stop Error 0x0000007b Louis LeBrun Windows Vista Installation 17 07-05-2006 09:00 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59