I have an x86_64 macOS app that according to Activity Monitor, it uses between 35 to 50MB of memory with an Intel MacBook Pro. When I run the same app in an M1 MacBook Pro with Rosetta, it shows 2.5 to 3x more memory in Activity Monitor.
I then updated the app in my M1 to both x86_64 and arm64, and run it again. In the Intel MacBook Pro it uses 40 to 60MB in Activity Monitor. In the M1, Xcode still shows the 3x increase in Memory Report and Activity Monitor.
In the M1, from Memory Report I clicked Profile in Instruments and it shows the heaviest stack trace is in system libraries, specifically this one:
46 AppKit 183.46 MB +[NSBundle(NSNibLoading) loadNibNamed:owner:]
See the image and the call tree all the way down to mmap:
However, when I try to profile the app again in my M1 but directly from Instruments > Allocations, it shows the regular 35-50MB memory usage, nothing more. [NSBundle(NSNibLoading) loadNibNamed:owner:] is not taking all the memory as above. Here is an image:
The only graphics the app has are a couple of storyboards with some custom Core Graphics code for custom drawings. I'm on Big Sur 11.2 and Xcode 12.4.
My understanding of memory usage using Instruments is basic, so my questions are:
- What could be happening here with the different memory usage between M1 vs Intel, and between Instruments and Instruments running from Memory Report?
- Why is all the memory going to this NSBundle(NSNibLoading) loadNibNamed:owner:]?
- How can I reduce the memory usage for the M1?
Thanks for any help!

