You are reading an old article on an old site. It only still exists so the information is not lost. Comments and mosts links are hidden and disabled.

AutoClosePatch 1.1 released

Updated to 1.1 on 24 February 2010

Some devices, especially the new 2009 Omnia series from Samsung do not have a lot of memory available. Some of these are also configured to use rather aggressive memory management. The result is that you can hardly start any amount of applications (3 or 4, usually) before the system starts to shut down already running applications, while half or more of the available physical memory is not being used at all.

What AutoClosePatch attempts to do is hook into these memory management functions and beat them into submission, preventing them from doing anything we have not explicitly told them to do.

Of course, we do have to have automatic application closing functionality so our devices do not get stuck in a low memory position, so occasionally we let the system do what it wants within specified parameters.

Note that this patch was specifically written and only tested on the Omnia II (I8000), but it should work on many WM 6.5 devices. This patch does not need any of the other changes mentioned in various MoDaCo threads and is compatible with TaskMon!

Also note that the system is not always very smart, and in my experience tends to close the last application I openened instead of the first.

Consider this a beta version (even though it is a 1.0 release). Several factors come into play and operation cannot be guaranteed. Works great for me, though!

I take no responsibility for issues that may occur, at all. If your dog explodes due to using AutoClosePatch, tough luck.

By default, my Omnia II starts closing apps when available memory drops below about 30mb, and doesn't stop closing apps until available memory has risen above about 45mb. As I start out with about 50mb of available memory this isn't very handy.

AutoClosePatch's default settings are to not start closing apps until available memory drops below 15mb, and to stop closing apps when available memory has risen to above 20mb.

The "Ultra" variant lowers this to 10/15, but has more chance of showing you an 'out-of-memory' dialog.

Install the AutoClosePatch CAB. If you want to play with the "Ultra" variant, install the normal version first!

Soft-reset after installation

Simply uninstall the CAB files if you are not using the "Ultra" variant. Uninstalling will clear most settings but not some system settings. These changes aren't harmful, but you'll need to hard-reset to clear them up.

Soft-reset after uninstallation

Skip this part if you're not a techy ;)

The whole thing is done through run-time patching, this means no files are modified on the device itself, only in-memory.

Some system calls are overridden / intercepted in shell32.exe, and depending on actual memory state WM_CLOSE may be re-cast as WM_HIBERNATE.

For the new 2009 Omnia series from Samsung TaskMon.dll is also patched, disabling it's application closing functionality. All other TaskMon functions should remain fully operational. In essence, only the standard WM application closing functionality should remain functional.

The low memory boundary (when apps start being closed) can be configured through the following registry key:


The high memory boundary (when apps stop being closed) can be configured through the following reigstry key:


You must soft-reset after changing these keys for them to take effect.

Also note that if you are going below the default 15/20 value you must install the "Ultra" settings first.

Furthermore, if you are playing with very low settings (and are thus using the "Ultra" settings) make sure to NOT set the CloseStopMB value above 20!


AutoClosePatch v1.1

AutoClosePatch v1.1 Ultra (Settings only)

Donations can be made through PayPal

1.1 Adjusted closing behavior so it closes less programs
1.1 Slightly adjusted default settings

1.0 Initial release

"Thank you" and such can go here.

For discussion and more elaborate comments, please post in the relevant threads on XDA-Developers or MoDaCo. If you don't have an account for either of these, you may post here directly, but I'd rather you didn't unless necessary or it's a "thank you" ;)

Note that I visit XDA-Developers a lot more often (say, 100 times a day) than MoDaCo (say, 0.2 times a day), so if it's urgent ...


Note the thread on MoDaCo is not specifically about AutoClosePatch, but about the problem AutoClosePatch was written for to fix.