Re: Example using PHYSICAL_ADDRESS
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Wed, 13 Feb 2008 22:32:35 -0800
joemango <joseandremorales@xxxxxxxxx> wrote:
Im writing a kernel process and i want to call the following
function:
PVOID
MmAllocateContiguousMemory(
IN SIZE_T NumberOfBytes,
IN PHYSICAL_ADDRESS HighestAcceptableAddress
);
But i dont know how to use the PHYSICAL_ADDRESS parameter, ive tried
initializing a variable of that type / struct,
You can't be serious.
PHYSICAL_ADDRESS pa;
pa.QuadPart = 0x3ffffffffULL; // just under 16GB
PVOID pv = MmAllocateContiguousMemory( 16384, pa );
Or even:
PHYSICAL_ADDRESS pa = { 0x3, 0xffffffff };
PVOID pv = MmAllocateContiguousMemory( 16384, pa );
ive looked on the net,
i dont find any working examples that show a call to it, so i need a
small sample that has , the necessary include files, how to create a
variable of that type give it a value and then make the call, can you
all help with this ????
You'll get the structure declaration when you include <ntddk.h> or <wdm.h>.
You are writing a driver, right?
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- References:
- Example using PHYSICAL_ADDRESS
- From: joemango
- Example using PHYSICAL_ADDRESS
- Prev by Date: Re: How can I estimate how much memory a DLL will take when loaded?
- Next by Date: Re: Shared directory
- Previous by thread: Re: Example using PHYSICAL_ADDRESS
- Next by thread: Event loop implementation using IOCP
- Index(es):
Loading