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!
REDISTRIBUTION AND COOKING INTO ROMS IS EXPLICITLY FORBIDDEN (for the time being)
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