We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 851487e commit a6c0614Copy full SHA for a6c0614
Foundation/Data.swift
@@ -12,7 +12,7 @@
12
13
#if DEPLOYMENT_RUNTIME_SWIFT
14
15
-#if os(Linux)
+#if !canImport(Darwin)
16
@inlinable // This is @inlinable as trivially computable.
17
internal func malloc_good_size(_ size: Int) -> Int {
18
return size
@@ -22,7 +22,11 @@ internal func malloc_good_size(_ size: Int) -> Int {
22
import CoreFoundation
23
24
internal func __NSDataInvokeDeallocatorUnmap(_ mem: UnsafeMutableRawPointer, _ length: Int) {
25
+#if os(Windows)
26
+ UnmapViewOfFile(mem)
27
+#else
28
munmap(mem, length)
29
+#endif
30
}
31
32
internal func __NSDataInvokeDeallocatorFree(_ mem: UnsafeMutableRawPointer, _ length: Int) {
0 commit comments