MacOS – Any way to know what causes allocation of wired memory

macosmemory

Activity Monitor lets me see how much memory is allocated as "wired", but I can't find a way to break the allocation down by applications or other memory consumers.

Is there a tool out there that lets me get this information?

Best Answer

I found a webpage which has this definition for wired memory:

Wired memory is used by the OS and is pretty much untouchable. Another application can't "borrow" wired memory

If you want to know more about how applications and frameworks are using memory on your system, try /usr/bin/allmemory. You must run it as root; sudo /usr/bin/allmemory is one way to accomplish that. When you run it, it will perform analysis for several seconds before showing output.

Here is a short example of the output:

                           Process Name [ PID]  Architecture    PrivateRes/NoSpec   Copied    Dirty    Swapped   Shared/NoSpec
                           ===================  ============    ================= ========= ========= =========  =============

                             WebProcess [ 317]:    64-bit        74126  /   73588      2102     48868       403  32777 / 30757
                                  Xcode [ 368]:    64-bit        55780  /   55711     25228     45570       595  43660 / 41720
                                 Safari [ 315]:    64-bit        25087  /   25087      2251     17647        52  35197 / 33513

See the allmemory man page (with the command man allmemory) for more details; here's an explanation of some of the columns:

PrivateRes: the number of pages resident in physical memory, not shared with other processes

Copied/Dirty: the number of resident pages that were copied or are dirty (non-exclusive)

Swapped: the number of pages that were in memory but have been swapped to disk.

Shared: the number of shared pages