A lightweight macOS menu bar app for live memory monitoring with an interactive pie chart.
- Memory usage with percentage ring (color-coded by pressure)
- Memory pressure indicator — Normal (green), Elevated (yellow), Critical (red)
- Free memory and compressed memory stats
- Updates every 1.5 seconds
Visual breakdown of system memory:
- App (blue) — Memory used by applications
- Wired (red) — Memory that can't be paged out
- Compressed (orange) — Memory compressed to save space
- Cached (yellow) — File cache (reclaimable)
- View top 8, 15, or 30 apps by memory usage
- Pie chart view — Visual breakdown with hover-to-inspect
- List view — Compact scrollable list for more apps
- Shows app icon, memory usage, thread count, and percentage
- Click any app for detailed process info
- Resident memory (actual RAM used)
- Virtual memory (address space)
- Thread count
- Open file descriptors
- Memory regions
- Page faults / page ins
- Parent PID
- Running time (uptime)
- Bundle ID and full path (copyable)
- Quick link to Activity Monitor
- Chart / List toggle — Switch between pie chart and list-only view
- 8 / 15 / 30 picker — Show more or fewer processes
- Mouse tracking on pie chart — hover to highlight slices
cd /Volumes/JS-DEV/memory-monitor
./build.shOutput: build/MemoryMonitor.app
open build/MemoryMonitor.appOr double-click the app in Finder.
cp -r build/MemoryMonitor.app /Applications/Then add to Login Items in System Settings → General → Login Items.
- macOS 12.0+ (Monterey or later)
- Apple Silicon (M1/M2/M3) or Intel
memory-monitor/
├── MemoryMonitorApp.swift # App entry point, menu bar setup
├── MemoryMonitor.swift # Memory stats + process monitoring
├── MenuBarView.swift # All UI views (main, detail, pie chart)
├── BridgingHeader.h # Darwin API imports
├── Info.plist # App configuration
└── build.sh # Build script
- Language: Swift 5.9+ / SwiftUI
- APIs: Darwin (
proc_pidinfo,host_statistics64,vm_statistics64) - Mouse tracking: NSTrackingArea via NSViewRepresentable
- Memory footprint: ~25 MB
- CPU usage: <1%
- No network access — pure local monitoring
- No special permissions — uses standard system APIs
In MemoryMonitor.swift:
updateInterval— Refresh rate (default: 1.5s)processLimit— Default number of processes (default: 8)
In MenuBarView.swift:
- Colors, layout, animations
- Process count options in
ProcessCountenum
- CPU usage monitoring
- Network speed monitor
- Disk usage
- Click to force-quit apps
- Memory usage alerts/notifications
- Historical graphs
- Export to CSV
MIT
