Which is the difference between the function
IoBuildPartialMdl and IoAllocateMdl?
Apparement they allocate all two MDL;
I do not see any difference in operation,
why in IoBuildPartialMdl there is like parameter " IN
PVOID VirtualAddress "??
Nothing understood, the address is already in sourcemdl-
>startva!
Will be used to you it for dedoubler an address virtual?
apparament not

How can you one read the true pointer MDL corresponding at
address memory indicated?
because when I modify a property of a variable pointer
MDL, the address memory corresponding to this MDL remains
similar

Re: Difference between IoBuildPartialMdl and IoAllocateMdl by Don

Don
Fri Jan 09 09:40:40 CST 2004

No the address is not in SourceMdl->StartVa since you can map a partial
range that
begins later and ends earlier than the original MDL. As the name implies,
this is creating a second MDL that maps a range already mapped by the first
MDL. Once the mapping is done, the two MDL's are independent.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"Sivaller" <NOSPAMsivaller.bewod@laposte.net> wrote in message
news:058501c3d6c4$986a4020$a001280a@phx.gbl...
> Which is the difference between the function
> IoBuildPartialMdl and IoAllocateMdl?
> Apparement they allocate all two MDL;
> I do not see any difference in operation,
> why in IoBuildPartialMdl there is like parameter " IN
> PVOID VirtualAddress "??
> Nothing understood, the address is already in sourcemdl-
> >startva!
> Will be used to you it for dedoubler an address virtual?
> apparament not
>
> How can you one read the true pointer MDL corresponding at
> address memory indicated?
> because when I modify a property of a variable pointer
> MDL, the address memory corresponding to this MDL remains
> similar



Re: Difference between IoBuildPartialMdl and IoAllocateMdl by Maxim

Maxim
Fri Jan 09 12:25:04 CST 2004

> Which is the difference between the function
> IoBuildPartialMdl and IoAllocateMdl?

IoBuildPartialMdl does not allocate a MDL, and requires IoAllocateMdl to be
called before.

IoBuildPartialMdl is more similar to MmBuildMdlForNonPagedPool, the difference
is that the former takes the physical addresses from the master MDL, while the
latter - from the known location of the NPP.

> why in IoBuildPartialMdl there is like parameter " IN
> PVOID VirtualAddress "??

For offset calculations only, do not dereference it, and substitute:

(PUCHAR)MmGetMdlVirtualAddress(MasterMdl) + Offset

for this parameter.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Difference between IoBuildPartialMdl and IoAllocateMdl by Maxim

Maxim
Fri Jan 09 12:26:40 CST 2004

> this is creating a second MDL that maps a range already mapped by the first
> MDL.

IoBuildPartialMdl creates a descriptor for sub-range, being given the
descriptor of range.

Useful for different "IO request splitting" tasks, and also can be used to just
clone a MDL.

>Once the mapping is done, the two MDL's are independent.

Not exactly. You must IoFreeMdl the slave before freeing the master.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com