Flight Simulator X, EZCA and FreeTrack – restart script v 1.1

1) Problem

I have not been using my EZCA restart script for some time and … I started to do again. I was little surprised when it turned out that it does NOT work anymore for some reason. EZCA just continued to eat memory until it crashed again. However, it did not throw millions of error messages on me, just closed itself (this counts to the fact that it is was EZCA P3D beta build). So I started to investigate and found out, that my approach to monitor EZCA memory consumption was not the best one. (This only happens if you use EZCA_RESTART_BY_MEM_LIMIT option). So I changed the approach to monitor EZCA memory consumption.

Simply saying, the script now saves current EZCA memory usage to file called: ezca_private_bytes.txt. So you can look there. When the script runs, the difference between actual memory consumption and saved memory consumption is calculated. This difference is than added to current memory consumption and the result is treated as future memory consumption. The script than checks if future memory consumption is less than defined safety value and continues to restart EZCA if it is not.

Some constants were also removed due to the change described above. Please see the .CHANGES section in the script comment for more details. Also, look at the detailed description of the script in the previous post: Flight Simulator X, EZCA and FreeTrack.

You can download the script here:

link-template-widget-dl.php

NOTE:
I am now using latest EZCA beta build, which should work with Prepar3D also. (It has little red text: “P3D beta” in the right top corner.