equivalent to NtAllocateVirtualMemory?

Greetings all, I’m New on kernel mode programming ( I have 1 month studying ) also I’m new on OSR online.

I would like to know which is the equivalent to NtAllocateVirtualMemory, My purpose is to allocate memory but I think if I’m working
in kernel mode I have to take advantage of the internal functions, right? also because I wanna get used to internals functions, thanks.

I have no idea why you would want to us NtAllocateVirtualMemory for any
purpose. When a process wishes to allocate memory, the application
usually calls an allocation function (such as the C library’s malloc
function). In some very rare cases, the programmer might call
VirtualAlloc directly, instead of using a wrapper like malloc or new. If
you want to allocate working memory in the kernel, this function is quite
pointless, since it represents a system service function called by the
user-level code to allocate memory to the current process. This is so
rarely done in the kernel by a driver that it isn’t even worth worrying
about, in spite of the frequency of questions of how to share kernel
memory with an app (the correct answer, in 99% of the cases, is to use
direct-mode I/O).

If you want the kernel equivalent of malloc, it is either ExAllocatePool,
or to provide error checking and usage monitoring, ExAllocatePoolWithTag.
Be sure you understand the IRQL level restrictions that apply.
joe

Greetings all, I’m New on kernel mode programming ( I have 1 month
studying ) also I’m new on OSR online.

I would like to know which is the equivalent to NtAllocateVirtualMemory,
My purpose is to allocate memory but I think if I’m working
in kernel mode I have to take advantage of the internal functions, right?
also because I wanna get used to internals functions, thanks.


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

thanks Joseph, then I will use ExAllocatePool or ExAllocatePoolWithTag. because I have no an user mode application to communicate

> thanks Joseph, then I will use ExAllocatePool or ExAllocatePoolWithTag.

because I have no an user mode application to communicate

****
The presence or absence of a user mode component has no impact on the
choice of allocation strategy for objects of your own invention inside a
driver.
joe
****


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