Memory Usage

Restrict Memory Usage | OutOfMemoryError

The programs memory is managed by Java, which means Java allocates a certain amount of memory which is then filled up with data of the program and once Java decides so, it cleans up data that is not used anymore (Garbage Collection). This leads to the actual memory usage going up and down constantly, while the allocated memory mostly stays the same. So even if only 50 MB are filled with data by the program at the time, Java may still have 200 MB reserved to optimize Gargabe Collection. Thus, the memory usage in e.g. the Task Manager may not reflect what the program actually requires, just how much Java uses.

Use the /appinfo command in Chatty to get some information about the current memory usage.

A typical memory usage pattern, which can change over time as the program is running while Java optimizes Gargabe Collection:
Typical memory usage pattern

Restrict Memory Usage

You can restrict how much memory Java is allowed to use by specifying commandline parameters for Java. Create a shortcut and add the appropriate parameter after the javaw.exe but before the -jar parameter.

For example to restrict memory to 400 MB: javaw -Xmx400M -jar "D:\Chatty\Chatty.jar". You should test out yourself how low you can go, although more than 150 MB is usually recommended. Note that Java will show a higher usage than this in the Task Manager, since this pretty much only restricts how much the program can store, Java will need some more for it's own management and data.

For the Windows Standalone version you can add this value to the file Chatty.cfg located in the app subfolder of the Chatty folder.


If you get an OutOfMemoryError then Java ran out of memory. This can either be because it simply can't allocate enough memory (at least 100 MB is recommended) or there is a bug that prevents it from cleaning up memory that is not actually used anymore. These kinds of bugs are pretty difficult to track down though, especially if they only occur somewhat randomly.