diff options
author | bschmidt <bschmidt@FreeBSD.org> | 2010-11-11 18:43:31 +0000 |
---|---|---|
committer | bschmidt <bschmidt@FreeBSD.org> | 2010-11-11 18:43:31 +0000 |
commit | b1835fd2117bc2a167fad828131af71d691130b5 (patch) | |
tree | b9df9537b4a38cadfed0dc7334ff701edd2480bc /sys/compat/ndis | |
parent | 9596952a638851a34a28be1cbc9f30d5032aaa8f (diff) | |
download | FreeBSD-src-b1835fd2117bc2a167fad828131af71d691130b5.zip FreeBSD-src-b1835fd2117bc2a167fad828131af71d691130b5.tar.gz |
According to specs for MmAllocateContiguousMemorySpecifyCache() physically
contiguous memory with requested restrictions must be allocated.
Submitted by: Paul B Mahol <onemda at gmail.com>
Diffstat (limited to 'sys/compat/ndis')
-rw-r--r-- | sys/compat/ndis/subr_ntoskrnl.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c index 04184ae..f169de5 100644 --- a/sys/compat/ndis/subr_ntoskrnl.c +++ b/sys/compat/ndis/subr_ntoskrnl.c @@ -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 |