Skip to content

Replace memoryPeak with actual process memory usage - #1062

Open
HEIHUAa wants to merge 2 commits into
CodenameCrew:mainfrom
HEIHUAa:process-memory
Open

Replace memoryPeak with actual process memory usage#1062
HEIHUAa wants to merge 2 commits into
CodenameCrew:mainfrom
HEIHUAa:process-memory

Conversation

@HEIHUAa

@HEIHUAa HEIHUAa commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Replace the second memoryPeak with the actual memory usage of the process as reported by the operating system. I believe this will be significantly more useful than the previous peak memory value. This works on Windows, macOS, and Linux. On non‑CPP targets or platforms other than these three, only a single memory number will be displayed, with the second one omitted.

@r6915ee

r6915ee commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

I think it may be useful to keep around an option to enable the peak memory value, as I've used it on occasion to determine memory usage issues in the case where a song might accidentally use too much memory and the current garbage-collected memory value changed too fast to get the actual value. Otherwise, I think this can also be useful.

@HEIHUAa

HEIHUAa commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

I think it may be useful to keep around an option to enable the peak memory value, as I've used it on occasion to determine memory usage issues in the case where a song might accidentally use too much memory and the current garbage-collected memory value changed too fast to get the actual value. Otherwise, I think this can also be useful.

Okay, I think your suggestion is fair. I'll add a setting to the debug options later. Personally, I've never really paid attention to the peak memory value — most of the time, it just gets frozen after a single large spike and stays there for a long time, which makes it pretty much useless except for very specific development needs. In most cases, it doesn't show anything meaningful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants