#include <kmt_test.h>
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ START_TEST()
Definition at line 13 of file IoMdl.c.
14{
18 ULONG MdlSize = 2*4096+184;
20
21
23
25 "IoAllocateMdl should fail allocation of 2Gb or more, but got Mdl=0x%X\n",
27
30
31
34 ok(
Mdl !=
NULL,
"Mdl allocation failed\n");
35
36 ok(
Mdl->Next ==
NULL,
"Mdl->Next should be NULL, but is 0x%X\n",
38 ok(
Mdl->ByteCount == MdlSize,
39 "Mdl->ByteCount should be equal to MdlSize, but is 0x%X\n",
41
42
44
45
47 ok(
Mdl ==
NULL,
"Mdl allocation for %lu bytes succeeded\n", TooLargeMdlSize);
49
51 ok(
Mdl ==
NULL,
"Mdl allocation for %lu bytes succeeded\n", TooLargeMdlSize -
PAGE_SIZE + 1);
53
57
59 ok(
Mdl !=
NULL,
"Mdl allocation for %lu bytes failed\n", TooLargeMdlSize / 2);
61
62
64 ok(
Irp !=
NULL,
"IRP allocation failed\n");
66 ok(
Mdl !=
NULL,
"Mdl allocation failed\n");
67 ok(
Irp->MdlAddress ==
Mdl,
"Irp->MdlAddress should be 0x%X, but is 0x%X\n",
69
71
72
73
76}
#define ExAllocatePool(type, size)
unsigned __int3264 UINT_PTR
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl