Is it possible to lock the memory in kernel driver

Hi All,
Is it possible to lock the memory in kernel driver allocated by malloc function in user mode.user wants to use that memory depending on his need without freeing the memory during his work.

At the time of exiting the application user wants to free that memory.

user also wants the physical address of that memory once it will be locked in the kernel driver.

Is it possible to achieve this. if yes how and if not why.

Regards


Tried the new MSN Messenger? It?s cool! Download now.
http://messenger.msn.com/Download/Default.aspx?mkt=en-in

What do you think you are going to do with this memory? So you lock it in
memory, taking physical mem from the system for any other purpose, please
explain why you think this is any thing but a stupid idea? If the user
allocates the memory it will not be contiguous so if it is over a page
getting “the physical address” is impossible, you can only get a number of
“physical addresses”. Finally what the heck is the application going to do
with the physical address, there is nothing it can reference with it, unless
you are doing a lot of other hacks.

Explain at a high level what the goal of this driver/application is, since
right now this is too stupid for any sane person to help you.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

“nayan kumar” wrote in message
news:xxxxx@ntdev…

Hi All,
Is it possible to lock the memory in kernel driver allocated by
malloc function in user mode.user wants to use that memory depending on his
need without freeing the memory during his work.

At the time of exiting the application user wants to free that memory.

user also wants the physical address of that memory once it will be locked
in the kernel driver.

Is it possible to achieve this. if yes how and if not why.

Regards

_________________________________________________________________
Tried the new MSN Messenger? It’s cool! Download now.
http://messenger.msn.com/Download/Default.aspx?mkt=en-in

You can lock any Virtual Memory using MmProbeAndLockPages provided you are in correct context. Thats y its called mostly by top most driver in the stack.

For this you need to create MDL for your Virtual Address range. Look for IoAllocateMdl documentation.

MDL itself contains the physical pages details but they are undocumented.

Also there is another documented function called MmGetPhysicalAddress to get physical address for given VA.

Hope it helps.

Dhiren.

nayan kumar wrote:
.hmmessage P { margin:0px; padding:0px } body.hmmessage { FONT-SIZE: 10pt; FONT-FAMILY:Tahoma } Hi All,
Is it possible to lock the memory in kernel driver allocated by malloc function in user mode.user wants to use that memory depending on his need without freeing the memory during his work.

At the time of exiting the application user wants to free that memory.

user also wants the physical address of that memory once it will be locked in the kernel driver.

Is it possible to achieve this. if yes how and if not why.

Regards

---------------------------------
Windows Live Spaces : Help your online world come to life, add 500 photos a month. Try it!

NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Did you know? You can CHAT without downloading messenger. Click here

In Linux kernel this problem can be solved really easy. You can just
walk on all relevant pages of specific range of memory and lock them.

In Win I know only one method I did once and it is good for application
with all time life memory.

You should

  1. Use MAXMEM=XXX switch to reserve memory XXX for your application.

IN user mode

  1. Pass some pointers from user mode to driver, assume "p_vir"

IN driver

  1. Use something like that:

PHYSICAL_ADDRESS phys_addr;

phys_addr.HighPart = 0;

phys_addr.LowPart = (ULONG) p_vir;

maps the given physical address range to nonpaged system space

IoMapedBaseVa = MmMapIoSpace(phys_addr ,size, MmCached);

value must be less than PAGE_SIZE * (65535 - sizeof(MDL)) /
sizeof(ULONG_PTR)

NonPagedPoolMdl = IoAllocateMdl(IoMapedBaseVa, size,FALSE,FALSE,NULL);

After IoAllocateMdl driver should call MmBuildMdlForNonPagedPool with
the MDL allocated

to set up an MDL describing a driver-allocated buffer in nonpaged pool.

The MmBuildMdlForNonPagedPool routine receives an MDL that specifies a
virtual memory buffer

in nonpaged pool, and updates it to describe the underlying physical
pages.

MmBuildMdlForNonPagedPool(NonPagedPoolMdl);

Now you should lock MmMapLockedPages but the routine is obsolete for
2000 and later,

UserVirtualAddress =
(PVOID)(((ULONG)PAGE_ALIGN(MmMapLockedPages(NonPagedPoolMdl,
UserMode))) + MmGetMdlByteOffset(NonPagedPoolMdl));

insteed use

UserVirtualAddress = MmMapLockedPagesSpecifyCache(NonPagedPoolMdl,

UserMode,

MmCached,

...
NormalPagePriority);

Here you have virtual address for using in User space, but before you
pass it up, first unmap space you taken.

MmUnmapIoSpace(IoMapedBaseVa,size);

Pass UserVirtualAddress to user .

Now you can complete your routine.

back to user space and there to use your pointer (UserVirtualAddress)

Enjoy

Emil E.H


You wrote :



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
Sent: Wednesday, April 09, 2008 3:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Is it possible to lock the memory in kernel driver

Hi All,
Is it possible to lock the memory in kernel driver allocated by
malloc function in user mode.user wants to use that memory depending on
his need without freeing the memory during his work.

At the time of exiting the application user wants to free that memory.

user also wants the physical address of that memory once it will be
locked in the kernel driver.

Is it possible to achieve this. if yes how and if not why.

Regards


Windows Live Spaces : Help your online world come to life, add 500
photos a month. Try it! http:</http:>

NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:

To unsubscribe, visit the List Server section of OSR Online at

You have not addressed how he should do it so that an application failure
does not leave locked memory, or the fact that MmGetPhysicalAddress will
resolve the first page, but not approach does not provide for contiguous
physical memory so the first page is worthless.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

“dhirendra pratap” wrote in message
news:xxxxx@ntdev…
> You can lock any Virtual Memory using MmProbeAndLockPages provided you are
> in correct context. Thats y its called mostly by top most driver in the
> stack.
>
> For this you need to create MDL for your Virtual Address range. Look for
> IoAllocateMdl documentation.
>
> MDL itself contains the physical pages details but they are undocumented.
>
> Also there is another documented function called MmGetPhysicalAddress to
> get physical address for given VA.
>
> Hope it helps.
>
> Dhiren.
>
> nayan kumar wrote:
> .hmmessage P { margin:0px; padding:0px } body.hmmessage {
> FONT-SIZE: 10pt; FONT-FAMILY:Tahoma } Hi All,
> Is it possible to lock the memory in kernel driver allocated by
> malloc function in user mode.user wants to use that memory depending on
> his need without freeing the memory during his work.
>
> At the time of exiting the application user wants to free that memory.
>
> user also wants the physical address of that memory once it will be locked
> in the kernel driver.
>
> Is it possible to achieve this. if yes how and if not why.
>
> Regards
>
>
>
> ---------------------------------
> Windows Live Spaces : Help your online world come to life, add 500 photos
> a month. Try it!
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> ---------------------------------
> Did you know? You can CHAT without downloading messenger. Click here

Except for a some special cases with embedded environments, this is one of
the worst things you can do in Windows. There are ways to allocate
contiguous physical memory but the OP has not really explained why he wants
to do this. But reserving memory by MAXMEM is not only a terrible idea, it
only works if all the other applications on the system either do not want to
do something similar or everything cooperates.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

“Emil Hastilov” wrote in message news:xxxxx@ntdev…
In Linux kernel this problem can be solved really easy. You can just
walk on all relevant pages of specific range of memory and lock them.

In Win I know only one method I did once and it is good for application
with all time life memory.

You should

1. Use MAXMEM=XXX switch to reserve memory XXX for your application.

IN user mode

2. Pass some pointers from user mode to driver, assume “p_vir”

IN driver

3. Use something like that:

PHYSICAL_ADDRESS phys_addr;

phys_addr.HighPart = 0;

phys_addr.LowPart = (ULONG) p_vir;

maps the given physical address range to nonpaged system space

IoMapedBaseVa = MmMapIoSpace(phys_addr ,size, MmCached);

value must be less than PAGE_SIZE * (65535 - sizeof(MDL)) /
sizeof(ULONG_PTR)

NonPagedPoolMdl = IoAllocateMdl(IoMapedBaseVa, size,FALSE,FALSE,NULL);

After IoAllocateMdl driver should call MmBuildMdlForNonPagedPool with
the MDL allocated

to set up an MDL describing a driver-allocated buffer in nonpaged pool.

The MmBuildMdlForNonPagedPool routine receives an MDL that specifies a
virtual memory buffer

in nonpaged pool, and updates it to describe the underlying physical
pages.

MmBuildMdlForNonPagedPool(NonPagedPoolMdl);

Now you should lock MmMapLockedPages but the routine is obsolete for
2000 and later,

UserVirtualAddress =
(PVOID)(((ULONG)PAGE_ALIGN(MmMapLockedPages(NonPagedPoolMdl,
UserMode))) + MmGetMdlByteOffset(NonPagedPoolMdl));

insteed use

UserVirtualAddress = MmMapLockedPagesSpecifyCache(NonPagedPoolMdl,

UserMode,

MmCached,


NormalPagePriority);

Here you have virtual address for using in User space, but before you
pass it up, first unmap space you taken.

MmUnmapIoSpace(IoMapedBaseVa,size);

Pass UserVirtualAddress to user .

Now you can complete your routine.

back to user space and there to use your pointer (UserVirtualAddress)

Enjoy

Emil E.H

-------------------------------------------------------

You wrote :

--------------



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumar
Sent: Wednesday, April 09, 2008 3:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Is it possible to lock the memory in kernel driver

Hi All,
Is it possible to lock the memory in kernel driver allocated by
malloc function in user mode.user wants to use that memory depending on
his need without freeing the memory during his work.

At the time of exiting the application user wants to free that memory.

user also wants the physical address of that memory once it will be
locked in the kernel driver.

Is it possible to achieve this. if yes how and if not why.

Regards



Windows Live Spaces : Help your online world come to life, add 500
photos a month. Try it! http:</http:>

NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Another test. Please disregard.

Don Burn wrote:

Except for a some special cases with embedded environments, this is one of
the worst things you can do in Windows. There are ways to allocate
contiguous physical memory but the OP has not really explained why he wants
to do this. But reserving memory by MAXMEM is not only a terrible idea, it
only works if all the other applications on the system either do not want to
do something similar or everything cooperates.

This is the one, I wanted to send across –
PS: Thanks Martin

I don’t understand your requirement here !

But you could do this totally in user space. Basically you are asking for
your own mini-memory manager. BTW, it is an unfair practice ( we all know
that, right?).

Recently I’ve done a prototype using Boost (doug lea’s ) allocator and
WAE(windows address extension api). But the idea was to avoid high rate of
paging i/o.

Result?

It works, but I did not yet get to the point to compare the I/O counts (
planned for later stage :slight_smile:

-pro

----- Original Message -----
From: “Martin O’Brien”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, April 09, 2008 6:47 PM
Subject: Re:[ntdev] Is it possible to lock the memory in kernel driver

> Another test. Please disregard.
>
>
> Don Burn wrote:
>> Except for a some special cases with embedded environments, this is one
>> of the worst things you can do in Windows. There are ways to allocate
>> contiguous physical memory but the OP has not really explained why he
>> wants to do this. But reserving memory by MAXMEM is not only a terrible
>> idea, it only works if all the other applications on the system either do
>> not want to do something similar or everything cooperates.
>>
>>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Hi All,
Thanks all for their input.
Its customer wish customer want this functionality in the driver so that he can allocate memory in user mode application that they are developing and then pass the address to the driver for locking it and getting the physical address.

I tried to convince hime that doing all this is not a good idea but he is not ready to accept his.

I really dont know why he wants this functionality.

Regards
Nayan

From: xxxxx@acm.org> Subject: Re:[ntdev] Is it possible to lock the memory in kernel driver> Date: Wed, 9 Apr 2008 09:20:19 -0400> To: xxxxx@lists.osr.com> > What do you think you are going to do with this memory? So you lock it in > memory, taking physical mem from the system for any other purpose, please > explain why you think this is any thing but a stupid idea? If the user > allocates the memory it will not be contiguous so if it is over a page > getting “the physical address” is impossible, you can only get a number of > “physical addresses”. Finally what the heck is the application going to do > with the physical address, there is nothing it can reference with it, unless > you are doing a lot of other hacks.> > Explain at a high level what the goal of this driver/application is, since > right now this is too stupid for any sane person to help you.> > > – > Don Burn (MVP, Windows DDK)> Windows 2k/XP/2k3 Filesystem and Driver Consulting> Website: http://www.windrvr.com> Blog: http://msmvps.com/blogs/WinDrvr\> Remove StopSpam to reply> > > > “nayan kumar” wrote in message > news:xxxxx@ntdev…> > Hi All,> Is it possible to lock the memory in kernel driver allocated by > malloc function in user mode.user wants to use that memory depending on his > need without freeing the memory during his work.> > At the time of exiting the application user wants to free that memory.> > user also wants the physical address of that memory once it will be locked > in the kernel driver.> > Is it possible to achieve this. if yes how and if not why.> > Regards> > > > Tried the new MSN Messenger? It?s cool! Download now.> http://messenger.msn.com/Download/Default.aspx?mkt=en-in > > > > —> NTDEV is sponsored by OSR> > For our schedule of WDF, WDM, debugging and other seminars visit: > http://www.osr.com/seminars&gt; > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Technology : Catch up on updates on the latest Gadgets, Reviews, Gaming and Tips to use technology etc.
http://computing.in.msn.com/

In my experience, that’s not an unusual request. I’ve implemented this same functionality for customers several times. It’s a sort of “I *really* don’t want this to be paged out. EVER.” feature.

Peter
OSR

Note: you must unlock the memory when the user process exits or even
crashes.

The only way to do so is to associate the memory with the pending
overlapped DeviceIoControl, which is automatically cancelled on process
exit/crash.

So, the user side opens an overlapped file handle to the driver and calls
DeviceIoControl.

The kernel side locks the memory by MmProbeAndLockPages and then pends the
IRP in cancellable state.

On cancellation, MmUnlockPages is called.

Also note that for METHOD_xxx_DIRECT IOCTLs, Irp->MdlAddress is
automatically locked by Io before delivering the IRP to the driver, so, no need
for the driver to call MmProbeAndLockPages.

To get the physical addresses (why are they needed for user mode? user mode
cannot do anything with them anyway) MmGetPhysicalAddress is present.


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

“nayan kumar” wrote in message news:xxxxx@ntdev…

Hi All,
Is it possible to lock the memory in kernel driver allocated by malloc
function in user mode.user wants to use that memory depending on his need
without freeing the memory during his work.

At the time of exiting the application user wants to free that memory.

user also wants the physical address of that memory once it will be locked in
the kernel driver.

Is it possible to achieve this. if yes how and if not why.

Regards

_________________________________________________________________
Tried the new MSN Messenger? It’s cool! Download now.
http://messenger.msn.com/Download/Default.aspx?mkt=en-in

wrote in message news:xxxxx@ntdev…
>


>
> In my experience, that’s not an unusual request. I’ve implemented this
> same functionality for customers several times. It’s a sort of “I
> really don’t want this to be paged out. EVER.” feature.
>
> Peter
> OSR

how about VirtualLock() + SetProcessWorkingSetSize() ?
The phys. addresses of pages can be obtained later by calling a driver.

–PA

AFAIK, SetProcessWorkingSetSize()is sort of advisory. If the systems
choose to trim the working set, it will do !!!

-pro

wrote in message news:xxxxx@ntdev…
>>


>>
>> In my experience, that’s not an unusual request. I’ve implemented this
>> same functionality for customers several times. It’s a sort of “I
>> really don’t want this to be paged out. EVER.” feature.
>>
>> Peter
>> OSR
>
> how about VirtualLock() + SetProcessWorkingSetSize() ?
> The phys. addresses of pages can be obtained later by calling a driver.
>
> --PA
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

VirtualLock will lock a page into a process working set so that it won’t be paged out during a trim of the working set. However if all of the threads in the process block in user-mode waits the OS (I think the old balance set manager, but I’m not sure about that) may still choose to swap the entire process address space to disk. In that case you’re pages are still paged out.

The only way to guarantee that a page won’t get paged out is to tickle the pages’s lock count, which can only be done from the kernel.

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Pavel A.
Sent: Friday, April 11, 2008 3:05 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Is it possible to lock the memory in kernel driver

wrote in message news:xxxxx@ntdev…
>


>
> In my experience, that’s not an unusual request. I’ve implemented this
> same functionality for customers several times. It’s a sort of “I
> really don’t want this to be paged out. EVER.” feature.
>
> Peter
> OSR

how about VirtualLock() + SetProcessWorkingSetSize() ?
The phys. addresses of pages can be obtained later by calling a driver.

–PA


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Peter,

However if all of the threads in the process block in user-mode waits the OS (I think the old balance set >manager, but I’m not sure about that) may still choose to swap the entire process address space to disk. In >that case you’re pages are still paged out.

I had 3 or 4 separate discussions about this issue with Mr.Pavel Lebedinsky from MSFT. On all occasions he was claiming that VirtualLock() locks pages not only in working set but in RAM as well, because, according to him, internally the system ignores flags that are specified in underlying ZwLockVirtualMemory() call. Taking into the fact that a call to ZwLockVirtualMemory() with
LOCK_IN_RAM flag may be successful if and only if SeLockMemory privilege is enabled on the target machine, while a call with LOCK_IN_WS flag does not require SeLockMemory privilege in order to be successful, I took his words with a certain degree of doubt (this is why we had several unrelated discussions on the issue). However, he maintained that LockMemory() guarantees that pages will get locked in RAM no matter what…

Anton Bassov

Pavel has pointed out the same thing to me after my post and he has a pretty good paper trail to prove that this is the case in the current implementation.

So it seems if you’re hoping to avoid the cost of a page fault in your application you could use it. However from a kernel point of view it makes little difference whether the application has used VirtualLock - kernel-code must still probe-and-lock the pages and/or access them under a try/except block in case the application changes its mind.

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Sunday, April 13, 2008 10:34 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Is it possible to lock the memory in kernel driver

Peter,

However if all of the threads in the process block in user-mode waits the OS (I think the old balance set >manager, but I’m not sure about that) may still choose to swap the entire process address space to disk. In >that case you’re pages are still paged out.

I had 3 or 4 separate discussions about this issue with Mr.Pavel Lebedinsky from MSFT. On all occasions he was claiming that VirtualLock() locks pages not only in working set but in RAM as well, because, according to him, internally the system ignores flags that are specified in underlying ZwLockVirtualMemory() call. Taking into the fact that a call to ZwLockVirtualMemory() with
LOCK_IN_RAM flag may be successful if and only if SeLockMemory privilege is enabled on the target machine, while a call with LOCK_IN_WS flag does not require SeLockMemory privilege in order to be successful, I took his words with a certain degree of doubt (this is why we had several unrelated discussions on the issue). However, he maintained that LockMemory() guarantees that pages will get locked in RAM no matter what…

Anton Bassov


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Emil
I want to discuss ths method u explained in this mail .
If u could give me your mail id so that i can drop you mail i would be very much thankfull to you.

Regards

Subject: RE: [ntdev] Is it possible to lock the memory in kernel driverDate: Wed, 9 Apr 2008 16:35:39 +0300From: xxxxx@orbotech.comTo: xxxxx@lists.osr.com

In Linux kernel this problem can be solved really easy. You can just walk on all relevant pages of specific range of memory and lock them.
In Win I know only one method I did once and it is good for application with all time life memory.

You should

  1. Use MAXMEM=XXX switch to reserve memory XXX for your application.
    IN user mode
  2. Pass some pointers from user mode to driver, assume ?p_vir?

IN driver
3. Use something like that:
PHYSICAL_ADDRESS phys_addr;

phys_addr.HighPart = 0;
phys_addr.LowPart = (ULONG) p_vir;

maps the given physical address range to nonpaged system space

IoMapedBaseVa = MmMapIoSpace(phys_addr ,size, MmCached);

value must be less than PAGE_SIZE * (65535 - sizeof(MDL)) / sizeof(ULONG_PTR)

NonPagedPoolMdl = IoAllocateMdl(IoMapedBaseVa, size,FALSE,FALSE,NULL);

After IoAllocateMdl driver should call MmBuildMdlForNonPagedPool with the MDL allocated
to set up an MDL describing a driver-allocated buffer in nonpaged pool.
The MmBuildMdlForNonPagedPool routine receives an MDL that specifies a virtual memory buffer
in nonpaged pool, and updates it to describe the underlying physical pages.

MmBuildMdlForNonPagedPool(NonPagedPoolMdl);

Now you should lock MmMapLockedPages but the routine is obsolete for 2000 and later,
UserVirtualAddress = (PVOID)(((ULONG)PAGE_ALIGN(MmMapLockedPages(NonPagedPoolMdl, UserMode))) + MmGetMdlByteOffset(NonPagedPoolMdl));

insteed use
UserVirtualAddress = MmMapLockedPagesSpecifyCache(NonPagedPoolMdl,
UserMode,
MmCached,
? NormalPagePriority);

Here you have virtual address for using in User space, but before you pass it up, first unmap space you taken.

MmUnmapIoSpace(IoMapedBaseVa,size);

Pass UserVirtualAddress to user .
Now you can complete your routine.
back to user space and there to use your pointer (UserVirtualAddress)
Enjoy

Emil E.H


You wrote :


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of nayan kumarSent: Wednesday, April 09, 2008 3:57 PMTo: Windows System Software Devs Interest ListSubject: [ntdev] Is it possible to lock the memory in kernel driver

Hi All, Is it possible to lock the memory in kernel driver allocated by malloc function in user mode.user wants to use that memory depending on his need without freeing the memory during his work.At the time of exiting the application user wants to free that memory.user also wants the physical address of that memory once it will be locked in the kernel driver.Is it possible to achieve this. if yes how and if not why.Regards

Windows Live Spaces : Help your online world come to life, add 500 photos a month. Try it!— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Fashion Channel : Want to know what?s the latest in the fashion world ? You have it all here on MSN Fashion.
http://lifestyle.in.msn.com/

nayan kumar wrote:

Hi Emil
I want to discuss ths method u explained in this mail .
If u could give me your mail id so that i can drop you mail i would be
very much thankfull to you.

Please do not do this. Technical discussions should remain in the
mailing list, so that others may benefit from your exchange of ideas.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.