"Out of memory. Please free some memory, then choose retry."

Why do I get a an error message that says "Smartheap Library out of memory. Please free some memory, then choose retry" when I run an overlay operation?

Smartheap is a program used by the Windows operating system to manage random access memory (RAM). This message means that all of the available RAM memory has been used up. Potential fixes are to add more RAM or to reduce the size of the input and overlay themes.

Out-of-memory errors on Windows

SmartHeap has no upper limit on how much memory it can manage, so the limit will be that set by the OS. Typically, though, the allocation process wastes some address space, and a process will run out of address space before (sometimes well before) the heap manager has stored 2 GB of data/objects. At that point you get an Out of Memory error.

If you have an extremely large memory pool (more than 128 MB), or if your application is so large (hundreds of megabytes) that address space is short, you should set the SmartHeap page size to 64K. This will minimize wastage of address space. The default SmartHeap page size in Win32 is 16 K. See the SmartHeap Programmer's Guide and other entries in this FAQ for additional info. Note that the page size is a per pool value,

I try to run XP as lean as I can get it-by disabling unnecessary services, disabling system restore for all drives, disable indexing, disable hibernate, going in and setting virtual memory manually to a reasonable permanent amount, disabling the visual effects I don't care about.

In addition to that I usually do some tweaking in two areas of the registry: