Hi Przemek, I've just peeked into the implementation and did some tests.
New dynamic FM STAT when turned off is about 8% slower than fully turned off FM STAT. Quite huge overhead :( Looks like a few branches can make such big difference (similar to HB_NO_DEBUG). It means this isn't a costless feature, and thus cannot replace our current solutions. Do you see any chance to somehow lessen this overhead? (maybe using indirect pointers instead of branching?) Brgds, Viktor On 2008.11.12., at 23:16, Przemyslaw Czerpak wrote:
2008-11-12 23:16 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/fm.c + added support for enabling/disabling memory statistic when application starts. To enable memory statistic it's enough to set HB_FM_STAT environment variable to non empty value. To disable memory statistic it's enough to set HB_NO_FM_STAT envvar. The default setting may depend on build time option. Now is enabled when memory statistic is compiled when harbour is created. It may not work if C compiler does not allow to check environment variables from startup code. F.e. functions to access environment can be also part of dynamic library registered after harbour.dll or harbour core code startup functions. Viktor I would like to ask you only about one thing. Please do not remove current support for HB_FM_STATISTICS_OFF from GNU make builds so Harbour user can still create binaries without any memory statistic code using -[no]fmstat switch in hb* scripts. The above feature is only for users who need support for enabling/disabling memory statistic to test application if foreign environment, f.e. at client computers. Of course if it will work with given C compiler and/or type of application (linked dynamically or statically). Please check. best regards Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour