7.4 Running an Application

There are two recommended methods of running an application with LeapHeap, derived from the DLL search rules outlined in section 7.1 How InstallLeapheapRegistry Works.

  1. Copy the executable file of the application into the LeapHeap directory. For Windows 2000 or XP, create a DLL redirection file called 'application_name.exe.local'. The content of the file is irrelevant. Under Windows Server 2003, the modified system DLLs must be copied or moved into a subdirectory with that name. Running the executable in the LeapHeap directory puts that directory first on the DLL search path. An application that runs as a service needs its ImagePath value under the registry key:
    changing. Some applications use a relative file path to pick up resources such as icons; therefore watch out for slight visual or behavioural differences when using this method. A more noticeable problem occurs if the application comes with a suite of DLLs; the PATH environment variable might have to be extended to include the original directory of the executable. Note that it is only ever the '.exe' file of an application that has to be copied to the LeapHeap directory; DLLs can stay where they are.
  2. Copy the lh.dll file and all modified system DLLs to the directory of the application. For Windows 2000 or XP, create a DLL redirection file there. For Windows Server 2003, create a DLL redirection folder and move the modified system DLLs into it.

Having got an application successfully running with LeapHeap, the next step is to make sure it is deriving benefit from doing so. Turn logging on in the registry and monitor compartment usage to verify that LeapHeap is handling significant traffic; section 8 Compatibility gives reasons why some applications might not gain from LeapHeap. Next it is desirable to make a performance comparison between LeapHeap and the native heap; a pre-existing stress test is ideal. For server applications constrained by a limit on concurrent connections, the limit should be raised to see if throughput can be increased.

Should Windows NT virtual memory (the size of the paging file or files) need to be expanded under LeapHeap, that is a good sign: the virtual memory system is being used as it was designed to be.