Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Re: memory allocation for storport miniport driver.

Reply
Thread Tools Display Modes

Re: memory allocation for storport miniport driver.

 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      07-26-2010
> i am writing a storport miniport driver and i have to allocate memory.
> which is the best option for allocating memory?


What memory? to what is it associated? to device? to LUN? to a request in progress?

Enlarge the device/LUN/SRB extension on this size.

> my requirement is i have to use that memory which can be accessed by
> both host and device, want to use DMA also.


Device and SRB extensions are DMAable using the same ScsiPortGetPhysicalAddress (at least in ScsiPort).

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      07-27-2010
>is it possible to allocate memory which i dont know during the
>initialization but dynamically e.g. in build io and start io i found
>that i am running out of memory for my command/data transfer


I would probably set the SRB extension size to cover the _largest possible_ command/data transfer.

>need to allocate some more memory? will this function
>"ScsiPortGetPhysicalAddress" works during that time also?


IIRC no. Only the IRP's MDL, the device extension and the SRB extension are covered by this mechanism in SCSIPORT. For instance, LUN extension is not.

--
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
Slow Vista startup Jedi940 Windows Vista Performance 1 01-13-2008 08:50 PM
Game Compatibility BCurrey Windows Vista Games 6 11-29-2007 08:11 PM
Going Golfing but not with Vista markbyrn Windows Vista Games 15 03-08-2007 10:59 AM
americas army stuttering under vista premium ernie Windows Vista Games 0 02-27-2007 10:20 PM
problem in dxdiag Peewee64 Windows Vista Games 0 02-14-2007 09:49 PM



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