Playdate Simulator used ~170GB of system memory

Hi! I'm sure this won't be enough information to do anything useful with but for posterity, I thought I'd report it just in case. I woke my MacBook from sleep yesterday to find this system dialog (please forgive the cell phone picture, the screenshot utility wasn't responding :woman_raising_hand:):

I can't reproduce the issue but the steps leading up to this may or may not be interesting?

The Simulator was last restarted several days before. I had been doing other tasks on my laptop, sleeping and waking it over several days, connecting and disconnecting from an external display, and the Simulator remained open in the background (which I do frequently/have done for a long time). It's probably worth noting that "Pause in Background" was unchecked. (I don't normally leave it in that state but I had hooked up the debugger briefly and forgot to change it back. The debugger was not connected when this happened.)

Nothing interesting was happening in the pdx that was running- standard Lua prototype and it currently uses under 2MB of Playdate memory when running.

As I write this, the Simulator is using ~2.8GB of memory and behaving normally. I assume there's a very real chance this will never happen again BUT I figured better to record it in case it does so there can be multiple data points. Thanks for everything y'all do!

SDK Version: 3.0.3
Platform: macOS Tahoe 26.3.1 (MacBook Pro M3 Max)

This happened to me a few days ago when I forgot the Malloc logs open. (I thought your screenshot was from my machine because we use the same apps).

Ah, interesting! I'm fairly certain I didn't have the Malloc Log open at the time but I might have opened it sometime during this particular session?

If you have Malloc Pool enabled it β€˜leaks’ all memory allocated, as @stephann noted that could be the cause of high memory usage over several days. Please keep an eye on it and let us know if you see it again.

Oh, got it! I definitely have the "Malloc Pool" option set to 16MB (to help catch game memory leaks). (Edit: I assume I don't run into this as often because I'm usually rebuilding/restarting my game regularly during development. :thinking:)

I usually leave that option enabled (all the time). Is that not recommended, @willco?

You can leave it on, just be aware it leaks and you should quit the Simulator when not in use. :slight_smile: