Calling user mode function from kernel app

Hi all
Previoisly i want to allocating a large memory in kernel but i don’t know
how.It seems a 64MB limitation.
And here is not someone to tell about that.

However if i can calling a user mode function from kernel my problem will
be solve.

please help me.
Thanks.

I want someone to give me a billion US dollars. I have a better chance than
you in what you are asking.

“Mohammad Tarhsaz” wrote in message
news:xxxxx@ntdev…
>
> Hi all
> Previoisly i want to allocating a large memory in kernel but i don’t know
> how.It seems a 64MB limitation.
> And here is not someone to tell about that.
>
> However if i can calling a user mode function from kernel my problem will
> be solve.
>
> please help me.
> Thanks.
>
>

And what is your “better chance”

Forget about user-mode, it’s not relevant here. How much memory do you
need in your driver, does it need to be paged or non-paged, and does it
need to be visible across multiple process contexts?

Mohammad Tarhsaz wrote:

Hi all
Previoisly i want to allocating a large memory in kernel but i don’t know
how.It seems a 64MB limitation.
And here is not someone to tell about that.

However if i can calling a user mode function from kernel my problem will
be solve.

please help me.
Thanks.


Nick Ryan (MVP for DDK)

Hi Nick Ryan and others
As i told before i need 100MB and above (paged-pool or non-paged-pool or
memorymaped,mdl,…)

Thanks.

You may have trouble pulling this much memory from the kernel paged or
non-paged pool, as you’ve found out. There simply isn’t a lot of
unclaimed kernel address space available for use. If you can do all your
work in the context of a single process, you can use
ZwAllocateVirtualMemory to allocate pages < 2GB. You can even lock these
pages down by calling IoAllocateMdl/MmProbeAndLockPages. But you must
work with the user-mode pointer, you can’t then call
MmGetSystemAddressForMdlSafe, since this will again attempt to claim
precious system virtual address space.

Mohammad Tarhsaz wrote:

Hi Nick Ryan and others
As i told before i need 100MB and above (paged-pool or non-paged-pool or
memorymaped,mdl,…)

Thanks.


Nick Ryan (MVP for DDK)