Explain Memory, RAM and Compressed in the process inspector
RAM exceeding Memory is normal for any SwiftUI/AppKit app — resident size includes system framework pages shared by every process, while the footprint counts only the process's own modified pages (in RAM, compressed or swapped) — but it reads like a bug without context. The inspector now shows a short "About memory" note under the figures, plus a line saying memory figures are unavailable when the process belongs to another user or the system (they read as zero otherwise). Bump version to 1.1.1 (3). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.1</string>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2</string>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -28,6 +28,7 @@ struct ProcessInspectorSheet: View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
liveStats
|
||||
memoryExplanation
|
||||
pathSection
|
||||
detailsSection
|
||||
}
|
||||
@@ -90,6 +91,25 @@ struct ProcessInspectorSheet: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// Plain-language guide to the three memory figures; without it, RAM being
|
||||
/// higher than Memory (normal for any SwiftUI app) looks like a bug.
|
||||
private var memoryExplanation: some View {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("About memory").font(.caption).foregroundColor(.secondary)
|
||||
Group {
|
||||
if process.memoryUsage == 0 && process.residentMemory == 0 {
|
||||
Text("Memory figures are unavailable for processes owned by another user or the system.")
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
Text("**Memory** — what this process is responsible for: its own modified pages, whether in RAM, compressed or swapped out. This is its real memory cost.")
|
||||
Text("**RAM** — pages physically in RAM right now, including system framework code shared by every app. It can be higher than Memory, because shared pages take up RAM only once.")
|
||||
Text("**Compressed** — the part of Memory that macOS has compressed to save RAM, including pages swapped out to disk, shown at their original size.")
|
||||
}
|
||||
.font(.caption)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder private var pathSection: some View {
|
||||
if let path = process.executablePath {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
|
||||
Reference in New Issue
Block a user