Replace memoryPeak with actual process memory usage - #1062
Conversation
|
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. |
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.