| View previous topic :: View next topic |
| Author |
Message |
TKalle Guest
|
Posted: Fri Apr 13, 2007 9:48 pm Post subject: Exception in FastMM |
|
|
Hi!
I get an exception in fastmm code that I have trouble finding out the cause
for so I need ideas for how to solve this.
I'am using FastMM version 4.78 with delphi 7 and the exception occurs in the
last row in the code below in FastGetMem routine when I'am creating an
object. This type of object has been created and destroyed several times in
an loop and it is towards the end of the loop it happens.
movzx edi, TSmallBlockType[ebx].OptimalBlockPoolSize
sub edx, edi
{Split the block in two}
lea eax, [esi + edi]
lea ecx, [edx + IsMediumBlockFlag + IsFreeBlockFlag]
mov [eax - 4], ecx
This didnt happen with the old FastMM version (4.23) I was using and in the
new version, if i turn off the release compiler defines and consequently use
fulldebugmode the problem disappear.
My compiler defines:
{Group the options you use for release and debug versions below}
{$ifdef Release}
{Specify the options you use for release versions below}
{$undef FullDebugMode}
{$undef CheckHeapForCorruption}
{$define ASMVersion}
{$undef EnableMemoryLeakReporting}
{$undef UseOutputDebugString}
{$define AssumeMultiThreaded}
{$undef NoDebugInfo}
{$else}
{Specify the options you use for debugging below}
{$define FullDebugMode}
{$define EnableMemoryLeakReporting}
{$define UseOutputDebugString}
{$define AssumeMultiThreaded}
{$define CheckHeapForCorruption}
{$undef NoDebugInfo}
{$endif}
Any ideas how to solve this?
Regards
/Fredrik |
|
| Back to top |
|
 |
Nicholas Sherlock Guest
|
Posted: Sat Apr 14, 2007 6:03 pm Post subject: Re: Exception in FastMM |
|
|
TKalle wrote:
| Quote: | Hi!
I get an exception in fastmm code that I have trouble finding out the cause
for so I need ideas for how to solve this.
I'am using FastMM version 4.78 with delphi 7 and the exception occurs in the
last row in the code below in FastGetMem routine when I'am creating an
object. This type of object has been created and destroyed several times in
an loop and it is towards the end of the loop it happens.
|
Can you pare your code down to a minimum example which demonstrates the
problem?
Cheers,
Nicholas Sherlock |
|
| Back to top |
|
 |
TKalle Guest
|
Posted: Mon Apr 16, 2007 8:11 am Post subject: Re: Exception in FastMM |
|
|
Not at the moment...the code is quite large and complex (and old) with lot
of dependencies between various parts so its quite diffucult to reduce it
(and my quess is that the problem will nog show up in a small example...but
I'am trying do do that since its my only option right now to try to find
what its going wrong).
/Fredrik
"Nicholas Sherlock" <N.sherlock (AT) gmail (DOT) com> wrote in message
news:4620d133 (AT) newsgroups (DOT) borland.com...
| Quote: | TKalle wrote:
Hi!
I get an exception in fastmm code that I have trouble finding out the
cause for so I need ideas for how to solve this.
I'am using FastMM version 4.78 with delphi 7 and the exception occurs in
the last row in the code below in FastGetMem routine when I'am creating
an object. This type of object has been created and destroyed several
times in an loop and it is towards the end of the loop it happens.
Can you pare your code down to a minimum example which demonstrates the
problem?
Cheers,
Nicholas Sherlock |
|
|
| Back to top |
|
 |
TKalle Guest
|
Posted: Sun Apr 22, 2007 11:49 pm Post subject: Re: Exception in FastMM |
|
|
Well...sometimes one are blind when looking att the code.
Had forgotten to turn on ShareMM and AttemptToUseSharedMM compiler flags in
the new version.
So now it works without problems.
Regards
/Fredrik |
|
| Back to top |
|
 |
|