According to specs for MmAllocateContiguousMemorySpecifyCache() physically

contiguous memory with requested restrictions must be allocated.

Submitted by:	Paul B Mahol <onemda at gmail.com>
This commit is contained in:
Bernhard Schmidt 2010-11-11 18:43:31 +00:00
parent eefcb5cd2a
commit 1f0820e9c3

View File

@ -2426,12 +2426,9 @@ MmAllocateContiguousMemorySpecifyCache(size, lowest, highest,
uint64_t boundary;
uint32_t cachetype;
{
void *addr;
size_t pagelength = roundup(size, PAGE_SIZE);
addr = ExAllocatePoolWithTag(NonPagedPool, pagelength, 0);
return (addr);
return (contigmalloc(size, M_DEVBUF, M_ZERO|M_NOWAIT, lowest,
highest, PAGE_SIZE, boundary));
}
static void
@ -2447,7 +2444,7 @@ MmFreeContiguousMemorySpecifyCache(base, size, cachetype)
uint32_t size;
uint32_t cachetype;
{
ExFreePool(base);
contigfree(base, size, M_DEVBUF);
}
static uint32_t