This question pertains to AmiBroker 6.20.1, Standard Edition (32-bit) running on a Windows 10 Professional (64-bit) system with 16GB of Physical Memory. AmiBroker is configured to allow a maximum of 512MB for In-memory cache.
When I run a backtest, the value for Free Virtual Memory in the Performance Monitor declines as expected as the backtest creates Static Variables. However, when the backtest is complete, even after I've removed all Static Variables, the Free Virtual Memory does not return to anywhere near its value before starting the backtest, even allowing for memory consumed by database cache.
Here's a fairly extreme example:
Free Virtual Memory
Before Backtest 3,700MB
After Backtest 570MB
(all Static Variables are removed)
After flushing Database Cache 850MB
The amount of virtual memory consumed during the backtest is not of concern. The test deliberately creates a large number of Static Variables.
But, how do I reclaim the virtual memory after the backtest is complete and the Static Variables are removed? (The only solution that I've found, so far, is to restart AmiBroker.)
Thanks in advance for your help,