Loading...
--- xnu/xnu-10002.1.13/iokit/Kernel/IOBufferMemoryDescriptor.cpp
+++ xnu/xnu-8796.101.5/iokit/Kernel/IOBufferMemoryDescriptor.cpp
@@ -59,7 +59,6 @@
void ipc_port_release_send(ipc_port_t port);
#include <vm/pmap.h>
-KALLOC_HEAP_DEFINE(KHEAP_IOBMD_CONTROL, "IOBMD_control", KHEAP_ID_KT_VAR);
__END_DECLS
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -219,10 +218,10 @@
}
/*
- * Set kalloc_heap to KHEAP_IOBMD_CONTROL if allocation contains pointers
+ * Set kalloc_heap to default if allocation contains pointers
*/
if (kInternalFlagHasPointers & _internalFlags) {
- kheap = KHEAP_IOBMD_CONTROL;
+ kheap = KHEAP_DEFAULT;
}
// make sure super::free doesn't dealloc _ranges before super::init
@@ -642,13 +641,11 @@
bool inContiguous)
{
OSSharedPtr<IOBufferMemoryDescriptor> me = OSMakeShared<IOBufferMemoryDescriptor>();
- mach_vm_address_t alignment;
-
- alignment = (inLength <= page_size) ? inLength : page_size;
+
if (me && !me->initWithPhysicalMask(
kernel_task, inDirection | kIOMemoryUnshared
| (inContiguous ? kIOMemoryPhysicallyContiguous : 0),
- inLength, alignment, 0 )) {
+ inLength, inLength, 0 )) {
me.reset();
}
@@ -706,7 +703,7 @@
}
if (internalFlags & kInternalFlagHasPointers) {
- kheap = KHEAP_IOBMD_CONTROL;
+ kheap = KHEAP_DEFAULT;
}
#if IOTRACKING