BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Exception in FastMM

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM
View previous topic :: View next topic  
Author Message
TKalle
Guest





PostPosted: Fri Apr 13, 2007 9:48 pm    Post subject: Exception in FastMM Reply with 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.


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





PostPosted: Sat Apr 14, 2007 6:03 pm    Post subject: Re: Exception in FastMM Reply with quote



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





PostPosted: Mon Apr 16, 2007 8:11 am    Post subject: Re: Exception in FastMM Reply with quote



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





PostPosted: Sun Apr 22, 2007 11:49 pm    Post subject: Re: Exception in FastMM Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.