The MidasSpeedFix unit now supports older Midas.dll versions. Due to a copy&paste bug the MidasSpeedFix unit wasn’t able to hook into the Midas Memory Manager of older Midas.dlls that use GlobalAlloc/GlobalFree.
MidasSpeedFix now comes with a reduced to the minimum FastMM 4.92 memory manager that can be used in Delphi 6-2005 by defining the USE_MIDAS_FASTMM compiler condition. You can use this to work with a full-debug FastMM4 for your application and a release FastMM4 for Midas.
How to use:
Add the MidasSpeedFix.pas unit to your Delphi or C++ Project (ProjectManager: Add Unit).
If you use MidasLib: The MidasSpeedFix unit must be added to the same module/package that contains the MidasLib unit.
Download:
Name | IDE Version | File | Size | Downloads | Added |
---|---|---|---|---|---|
Midas Speed Fix 1.2 | 6-2009 | MidasSpeedFix12.zip | 35.96 KB | 6713 times | 2009-03-11 |
Hi Andreas,
maybe a stupid question, but if i’m already linking in FastMM 4.92 do i need to include also the midas_fastmm unit as well?
tia,
marc
That depends on what you want to do. If you use FastMM4 in full-debug mode but you want all the speed you can get from the TClientDataSet, then you can define the USE_MIDAS_FASTMM condition. By default it is disabled.
On the other hand, if you want all the speed you can get, why are you in full debug mode in the first place? ๐ I only ever use it for tracking down leaks.
Hi Andreas.
On same computers application not run – show next error:
‘MidasSpeedFix and MidasLib must be in the same module/package’
On another computers application working.
Why?
I include unit in my project dpr
uses
MidasLib,
MidasSpeedFix,
SysUtils,
….
The exact same EXE file? Or do some have a different EXE file?
It’s one exe file.
I deploy my application on 100 computers and on three computers (2 – Win XP, 1 – Win Server 2003) see this error.
The unit not work in exe compressed with upx.
Yes I make not compressing exe and it’s working.
But on 97 computers working exe compressed with UPX.
That means UPX extracts the program code different on some machines. I don’t think that I can support exe-packers because that would mean that the MidasSpeedFix unit would have to inspect the whole address space (4 GB) to find the Midas functions. And how should I test the code if UPX extract the code the expected way on my systems?
My test is with upx-ucl and upz-nrv in a Linux OS.
I compress the exes files in samba server.
Not I test with upx for windows.
Maybe is a another great work Andreas.
May be problem with compressed exe only on computers with Win XP SP1?
Hi Andreas,
This looks *very* good. We are using BDS2006, and in our primary application we get an Out of Memory error. Any ideas? You can contact me directly if you want more information.
Thanks for all your hard work.
Iยดm having the same error too! “Out of Memory”.
Is there any fix yet?
Thanks!
Do you get “Out of memory” only with the MidasFix or also with the original memory manager?
Hi!
I’ve been adding MidasSpeedFix.pas to a dozen C++ projects (all using midas.lib),
and today it hit me that a probable better way would be to just compile it once and link it
with a “#pragma link” on all projects. It worked (checked with a quick added OutputDebugString
on MidasSpeedFix) and this brings to a little request.
Would it be possible to add a hppemit statement like
{$HPPEMIT ‘#pragma link “MidasSpeedFix”‘}
to MidasSpeedFix.pas? This way it would be a simple matter of adding
#include “MidasSpeedFix.hpp”
to any project that requires it or better yet (in my case at least),
to a single common database library. All projects that uses it are
auto “magically” patched.
PS: Let’s hope html parsing doen’t break the includes above.
“…to a single common database library. All projects that uses it…”
Just to be clear, I was referring to *including* this common unit *header* file ๐