If you've experienced excessive memory use, I'll need to see what memory is allocated to be able to resolve the issue. Luckily, macOS comes with tools to capture this information.
Easy Method
The easiest way to record details about memory usage is to run these commands, which download and execute a bash script:
curl -O https://iterm2.com/misc/heapshot.sh
bash heapshot.sh
It will produce a file /tmp/memory_diagnostics.zip
which you can attach to a gitlab issue. Note that it may take a long time if the process size is huge, so plan accordingly.
Manual Execution
If you prefer to run individual commands manually or if the script doesn't work for you for any reason, this is what needs to be done:
PID=pid # CHANGE pid TO THE PROCESS ID
heap -s -guessNonObjects -showSizes $PID > /tmp/heap.txt
vmmap $PID >> /tmp/heap.txt
leaks -nocontext $PID > /tmp/leaks.txt
leaks --outputGraph=/tmp/graph.memgraph $PID
where pid
is the process ID of iTerm2. There will be many processes name iTerm2, but look for the one in activity monitor that has an icon next to it). After running the command, attach /tmp/heap.txt
, /tmp/leaks.txt
, and /tmp/graph.memgraph
to an issue.