exception 0xc00000a1 at MmProbeAndLockPages

Hi,

I have written a simple driver and an app to send
write requests to the device the driver handles.

In the app, i malloc a buffer of 74 MB, I adjust the
ProcessWorkingSet of the current process and call
VirtualLock on the buffer allocated.
SetProcessWorkingSet succeeds, VirtualLock fails.

After that I call WriteFile to write the allocated
buffer .The request is received by the write method in
my driver, where i allocate several MDLs for the
buffer. (Cannot allocate a single MDL because of
limitation on size of buffer in IoAllocateMdl).

I then try to lock the pages using
MmProbeAndLockPages.
After locking few mdls, the function gives exception
c00000a1.

The driver works well for buffers of small sizes like
1 MB or so.

What is causing the exception and how can it be
resolved?

Thanks and Regards
Amol Surati


Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com

Exception? You are calling MmProbeAndLockPages within a Try/Except
handler, right? This is error STATUS_WORKING_SET_QUOTA. Try not
attempting to lock down all the MDLs at once.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of amol surati
Sent: Tuesday, September 20, 2005 5:55 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] exception 0xc00000a1 at MmProbeAndLockPages

Hi,

I have written a simple driver and an app to send
write requests to the device the driver handles.

In the app, i malloc a buffer of 74 MB, I adjust the
ProcessWorkingSet of the current process and call
VirtualLock on the buffer allocated.
SetProcessWorkingSet succeeds, VirtualLock fails.

After that I call WriteFile to write the allocated
buffer .The request is received by the write method in
my driver, where i allocate several MDLs for the
buffer. (Cannot allocate a single MDL because of
limitation on size of buffer in IoAllocateMdl).

I then try to lock the pages using
MmProbeAndLockPages.
After locking few mdls, the function gives exception
c00000a1.

The driver works well for buffers of small sizes like
1 MB or so.

What is causing the exception and how can it be
resolved?

Thanks and Regards
Amol Surati


Yahoo! Mail - PC Magazine Editors’ Choice 2005
http://mail.yahoo.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com