X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/e5568f75972dfc723778653c11cb6b4dc825716a..743b15655a24ee3fe9f458f383003e011db0558f:/iokit/Kernel/IOMapper.cpp diff --git a/iokit/Kernel/IOMapper.cpp b/iokit/Kernel/IOMapper.cpp index 66f56480d..f9be25915 100644 --- a/iokit/Kernel/IOMapper.cpp +++ b/iokit/Kernel/IOMapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2003 Apple Computer, Inc. All rights reserved. + * Copyright (c) 1998-2004 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -171,7 +171,7 @@ IOMapper::NewARTTable(IOByteCount size, vm_size_t iopl_size = size; kr = vm_map_get_upl(kernel_map, - startUpl, + (vm_map_offset_t)startUpl, &iopl_size, &iopl, 0, @@ -212,8 +212,10 @@ void IOMapper::FreeARTTable(OSData *artHandle, IOByteCount size) ARTTableData *dataP = getARTDataP(artHandle); int numupls = ((artHandle->getLength() - sizeof(*dataP)) / sizeof(upl_t)); - for (int i = 0; i < numupls; i++) - kernel_upl_abort(dataP->u[i], 0); + for (int i = 0; i < numupls; i++) { + upl_abort(dataP->u[i], 0); + upl_deallocate(dataP->u[i]); + } if (dataP->v) { size = round_page_32(size);