Re: "Converting" MmMapLockedPages to MmMapLockedPagesSpecifyCache

> >Is this MmMapLockedPagesSpecifyCache(mdl, accessmode, MmCached, NULL,

>FALSE, NormalPagePriority) ???

MmMapLockedPagesSpecifyCache(mdl,accessmode,MmCached,0,TRUE,HighPagePriority
);

NO! There are two problems with the above:

a) In Whistler, drivers that call MmMapLockedPagesSpecifyCache() with the
BugCheckOnFailure parameter set to TRUE, as shown above, will fail driver
verifier. I didn’t write it, so please don’t send me email asking why
there’s an option for which you’re only allowed to specify one of the two
possible values.

b) It is an error to convert ordinary calls to MmMapLockedPages() to calls
to MmMapLockedPagesSpecifyCache() using HighPagePriority for
MM_PAGE_PRIORITY. Most drivers should specify NormalPagePriority, and
reserve HighPagePriority for times when it is truely needed.

So, the correct translation would be:

MmMapLockedPagesSpecifyCache(mdl, accessmode, MmCached, NULL, FALSE,
NormalPagePriority);

Peter
OSR


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com