Build Your Own Arcade Controls Forum

Front End Support => MaLa Frontend => Topic started by: ncflagg on October 17, 2009, 12:09:55 pm

Title: MaLa Memory Leak?
Post by: ncflagg on October 17, 2009, 12:09:55 pm
I was having some trouble with certain games randomly not loading on my cab so I started monitoring how much RAM was available. Whilst monitoring I noticed that every time I scrolled through the MaLa menu Mala.exe added 100k+ or more to the total used memory. It loads at 12MB and keeps increasing. I renamed my snaps folder and scrolled through the menu again and the total didn't increase any more. I also noticed that when the MaLa screensaver is running (showing screenshots again) the memory continues to increase.

From what I can see MaLa never releases the memory it uses. It just keeps building up (I've seen it over 30MB) and that's why some of my roms were failing to load. Mame couldn't get enough free memory. I patched the issue by killing Mala.exe with pskill from my mame.bat and then reloading it once Mame quits. It does this with MaLa 1.04 and 1.05.

I haven't seen anyone else mention this issue and was curious if it was known or not.
Title: Re: MaLa Memory Leak?
Post by: loadman on October 22, 2009, 05:23:14 am
WOW. Yeah memory leaks are a slow killer

I have not heard of that either

Will keep an eye out now
Title: Re: MaLa Memory Leak?
Post by: ncflagg on October 25, 2009, 12:13:43 am
I remembered that I am using the Gamelauncher layout with the screenshots stretched to full screen in a vertical orientation.
Title: Re: MaLa Memory Leak?
Post by: loadman on October 25, 2009, 12:46:03 am
I used to use that layout for a long time with no issues so I don't think that is it.
Title: Re: MaLa Memory Leak?
Post by: vortexblue on January 03, 2010, 01:56:26 pm
Was there any sort of resolution to this?
I am having the same issue-- as you scroll thru the game selection list, the size of the snap image is being added to the total memory usage.  It just keeps it in ram and never releases it.

For now, I'm just frequently reloading Mala.  Any suggestions?
Title: Re: MaLa Memory Leak?
Post by: ncflagg on January 03, 2010, 08:27:53 pm
I didn't realize this until recently but in XP (and probably other Windows OSes) when you minimize a program extra memory is released. Maybe there was a way to force an app to release memory from the command line and run it every few minutes while MaLa is open.

If MaLa does indeed release memory when it's minimized then NirCMD could be used to minimize it occasionally to free up some ram rather than constantly having to unload/reload it

NirCMD
http://www.nirsoft.net/utils/nircmd.html (http://www.nirsoft.net/utils/nircmd.html)

Found this reg key in XP to always reload DLLs instead of caching them (not sure if this applies or not
http://www.dq.winsila.com/windows/windows-xp-tips/speed-up-your-pc-force-windows-xp-to-release-dlls.html (http://www.dq.winsila.com/windows/windows-xp-tips/speed-up-your-pc-force-windows-xp-to-release-dlls.html)
Title: Re: MaLa Memory Leak?
Post by: loadman on January 04, 2010, 01:49:24 am
Was there any sort of resolution to this?
I am having the same issue-- as you scroll thru the game selection list, the size of the snap image is being added to the total memory usage.  It just keeps it in ram and never releases it.

For now, I'm just frequently reloading Mala.  Any suggestions?

I don't have this issue.

So if someone can tell me a sure fire and simple recipe to reproduce then possibly I could fix?
Title: Re: MaLa Memory Leak?
Post by: loadman on May 05, 2010, 04:09:23 am
OK I am now using the latest version of the image loader.

Seems to be better