If an app (even badly coded) causes memory leaks in the OS, that's a fault of the OS still. Of course fast moving OSes like Android or iOS are always going to have these kinds of bugs and it's probably not related to Swift as Swift isn't used in the kernel internals.
I write kernel mode drivers as my day job, and this is certainly the first time I've ever heard of non-swappable being called "wired".
It might be called "non-pageable", "pinned", "non-swappable", etc. Out of those, I'd prefer "non-pageable", because it's the most descriptive term for it.
Non-standard terminology is not great for communication.
- Non-pageable memory: cannot be freed until explicitly released by the owner
- Userland memory can be wired by mlock(2) (subject to system and per-user limits)
- Kernel memory allocators return wired memory
- Contents of the ARC and the buffer cache are wired
- Some memory is permanently wired and is never freed (e.g., the kernel file itself)
> I write kernel mode drivers as my day job, and this is certainly the first time I've ever heard of non-swappable being called "wired".
Really ? Because it's literally called that in macOS Activity Monitor app, the term is also used in Apple's kernel documentation and API's (e.g. in the `mem_and_io_snapshot` struct defined in 'debug.h' in Kernel.framework). It's also mentioned in the Kernel Programming Guide.
Never did macOS drivers, just bare metal, Windows and Linux so far, macOS is not very big in our niche. Weird that Apple's terminology is so different.
Typing this on a Macbook Pro, and I can see that Activity Monitor does mention "wired" memory.
I did a little googling and I see the terminology is also used in the Mach microkernel, which macOS's XNU kernel was built upon. It looks like it's not something Apple came up with.