Build a test harness & run it under Visual Studio maybe?
IIRC There are debugging options in MSVCRT.dll to display memory leaks
Build a test harness & run it under Visual Studio maybe?
B"H
Thanks.
Wrote a C++ application (using Visual Studio) making a same use of this DLL, as the EA I'm checking.
Its peak memory consumption - ~850[KB].
1. Any idea why does attaching the EA to a symbol consumes ~100[MB]?
2. Could you please elaborate on your second suggestion (debugging options in MSVCRT.dll)?
Thanks,
Simha
B"H
Thanks.
Wrote a C++ application (using Visual Studio) making a same use of this DLL, as the EA I'm checking.
Its peak memory consumption - ~850[KB].
1. Any idea why does attaching the EA to a symbol consumes ~100[MB]?
2. Could you please elaborate on your second suggestion (debugging options in MSVCRT.dll)?
Thanks,
Simha
maybe about lot of history bars in use and maybe your ea also take prices from different timeframes?
maybe about lot of history bars in use and maybe your ea also take prices from different timeframes?
The EA is currently a mere skeleton wrapping the DLL. It does NOT perform any kind of trading or trading-related actions.
Is your answer still relevant for such an EA?
looking for memory leaks via _CrtDumpMemoryLeaks() etc ...
http://msdn.microsoft.com/en-us/library/e5ewb1h3%28v=VS.80%29.aspx
B"H
Thanks. I'll look into that.
Do you load any indicators in the EA, maybe with data from different pairs and timeframes? I have one EA that is using iClose() to use prices from 7 other pairs. This alone already causes memory consumption. If I put this EA on an M1 chart (I have lots of history there) the EA alone (without loading any dll) will consume massive amounts of memory. It seems this is normal for MT4.
B"H
As mentioned above, I run a "bare" EA, meaning: not using indicators, no history-data, not trading (i.e. not opening positions AT-ALL). An EA that does NOTHING.
Could you check and see whether this is the case on your MT4 terminal as well.
Thanks,
Simha
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
B"H
Hello,
Upon running my EA (which makes use of a single self-developed DLL) on a single symbol, the memory consumption of the MT4 terminal (terminal.exe) is raised by ~100[MB].
Running the same EA on another symbol (additionally) increases terminal's memory consumption by ~100[MB] more.
And so on... Memory consumption is raised by ~100[MB] for every additional symbol on which this EA is operated.
DLL does not allocate more than ~0.5[MB] of memory, once, upon its loading.
How can I analyze this relatively extremely-large memory-consumption enlargement?
Are there any tools showing what consumes so much memory?
I'm aware of tools showing the contents of a running process { allocated mem., threads, mutexes, events, handles, etc... }, as the "Process Explorer",
but they're not sufficient to analyze the cause for this consumption.
Thanks much,
Simha