Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion PyMemoryEditor/app/memory_map_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ def _populate(self) -> None:
scroll_value = self._table.verticalScrollBar().value()

total = len(self._snapshot)
total_bytes = sum(int(region.size) for region in self._snapshot)
total_bytes = sum(
int(region.size) for region in self._snapshot
if region.is_readable or region.is_writable or region.is_executable
)

# Disable sorting while rebuilding so the model isn't re-sorted on every
# appendRow (and rows don't shuffle mid-build).
Expand Down
6 changes: 6 additions & 0 deletions PyMemoryEditor/app/memory_viewer_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,14 @@ def _build_ui(self) -> None:
self._size_spin.setSingleStep(16)
top.addWidget(self._size_spin)

spin_h = self._size_spin.sizeHint().height()

refresh_btn = QPushButton("Read")
refresh_btn.setObjectName("secondary")
refresh_btn.setStyleSheet(
f"min-height: 0px; max-height: {spin_h}px; padding: 2px 14px;"
)
refresh_btn.setFixedHeight(spin_h)
refresh_btn.clicked.connect(self.refresh)
top.addWidget(refresh_btn)
layout.addLayout(top)
Expand Down
4 changes: 2 additions & 2 deletions PyMemoryEditor/app/open_process_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def run(self) -> None:
mem = _macos_phys_footprint(pid)
if mem < 0:
try:
# RSS — physical memory in use. VMS on macOS is useless
# RSS — physical memory in use. VMS is useless
# here: the kernel reserves huge virtual ranges for
# dyld/frameworks/malloc zones, so every process looks
# like 100s of GB.
Expand Down Expand Up @@ -219,7 +219,7 @@ def _build_ui(self) -> None:

self._model = QStandardItemModel(0, 4, self)
self._model.setHorizontalHeaderLabels(
["PID", "Process Name", "Memory (RSS)", "User"]
["PID", "Process Name", "Memory", "User"]
)

self._proxy = _ProcessSortProxy(self)
Expand Down
Loading