FastMM4 for extended stored procedures DLLs under SQL Server
- From: "ggeshev" <ggeshev@xxxxxxxxxx>
- Date: Tue, 17 Jun 2008 12:41:43 +0300
Hello!
My company developed a huge project. Problems with memory usage pushed us
toward memory manager replacement. We chose FastMM478. According to rules
described in FastMM4_Readme.txt file from the downloaded folder I replaced
the default Borland memory manager.
For all the client side of our application and also for all the server side
we do not experience no problems after replacement.
But we have another part of the project which is a set DLLs which implement
extended stored procedures for MSSQL Server. Any of these DLLs has "uses"
clause like this :
library MSSQLFunc;
uses
FastMM4 in 'FastMM4.pas',
SysUtils,
Classes,
Windows,
Variants :
For these DLLs I switched on these FastMM options:
{$define AssumeMultiThreaded}
{$define NeverUninstall}
{$define NoMessageBoxes}
When using the DLLs now we experience a crash - SQL Server process crashes,
not right in the beginning but after a while. And because of the fixed
moment of crash I began to experiment what conditions could I use to avoid
the crash. I began choosing different FastMM options switching ON and OFF.
Finally when I compiled with "{$define FullDebugMode}" everything was good
and no crash was observed.
Unfortunately this is unsuitable because of the heaviness of the
FullDebugMode. We expect a speed impact in that case.
Something more. See where the crash is:
function ConceptTools_UpStr(s:string):string;
var
q:string;
i:integer;
begin
q:='';
if length(s) > 0 then
for I := 1 to length(s) do
q:=q+UpCase(s[i]); ?--- when the "i" has a value of 4, code
crashes here
ConceptTools_UpStr := q;
end;
Two reasons make me think the problems is in FastMM4:
1.. The exception is on such a place that is so close to mere memory
operations. Inside Borland procedure "UpCase" you can see a lot of assembler
code. No ours instance of object is involved.
2.. Good behavior when "{$define FullDebugMode}"
Please someone has any proposals what can be done?
I am ready to send all the Delphi code of all the DLLs.
Thank you!
.
- Follow-Ups:
- Re: FastMM4 for extended stored procedures DLLs under SQL Server
- From: Pierre le Riche
- Re: FastMM4 for extended stored procedures DLLs under SQL Server
- Prev by Date: Re: Swapping 2 bytes
- Next by Date: Re: Swapping 2 bytes - the story behind XOR
- Previous by thread: Swapping 2 bytes
- Next by thread: Re: FastMM4 for extended stored procedures DLLs under SQL Server
- Index(es):
Relevant Pages
|