Giant Memory Leak

When i enable 16mb malloc pool the sdk leaks around 50mb a second.

I'll say, I looked into this briefly on my computer, and noticed the Playdate Simulator in Activity Monitor on MacOS 12.4 did in fact act noticeably different with the malloc pool enabled.

It sits at a stable 48-60mb with it disabled, and sometimes it slowly climbs with it enabled. Not 50mb/s, but I did see it go by 5-10mb/s once, indefinitely climbing. I couldn't consistently reproduce it though, so take this anecdotally. I also don't know enough about system memory to know if it's of concern.

To track memory allocations it will "leak" them all to keep track of the history. If your game allocates a lot of memory quickly it will climb quickly. This is expected and isn't recommended to have enabled for normal development. You can press the Clear button which will reset the malloc log history and free the memory.

1 Like

Very good to know ! It may be nice to have that info in the section in the Profiling section of the Inside Playdate.