| View previous topic :: View next topic |
| Author |
Message |
Mike Williams (TeamB) Guest
|
Posted: Fri Dec 23, 2005 7:04 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Andrew Jameson wrote:
| Quote: | Perhaps someone might enlighten me and others about the basics of
FastMM4, for example :
1. Is FastMM4 beneficial for all applications ?
|
Yes.
| Quote: | 2. What type of applications would gain most from FastMM4.
|
Applications that make a lot of memory allocations.
| Quote: | For the totally uninitiated, it isn't clear what FastMM4 is all about.
|
Delphi has always had the ability to use a replacement memory manager.
A contest was held amongst replacement memory managers and FastMM
turned out to be consistently one of the best. Besides performing
better than the default Borland manager FastMM has some nice debugging
options that you can enable that will detect memory leaks, invalid
references, etc. It turned out that this works so well that Borland
not only decided to use FastMM as the new default memory manager but
also used it with D2006 itself. It improved the performance of Delphi
as well as helped Borland track down some IDE errors. You can read
more about this in Allen's blog here:
http://blogs.borland.com/abauer/archive/2005/09/28/21433.aspx
--
-Mike (TeamB)
|
|
| Back to top |
|
 |
Andrew Jameson Guest
|
Posted: Fri Dec 23, 2005 7:42 pm Post subject: FastMM4 - Memory Manager |
|
|
Hi,
There's just been a fairly hefty thread on FastMM4 and another thread on
speeding up applications.
Perhaps someone might enlighten me and others about the basics of FastMM4,
for example :
1. Is FastMM4 beneficial for all applications ?
2. What type of applications would gain most from FastMM4.
For the totally uninitiated, it isn't clear what FastMM4 is all about.
Many thanks
Andrew
|
|
| Back to top |
|
 |
danny heijl Guest
|
Posted: Fri Dec 23, 2005 8:41 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Mike Williams (TeamB) schreef:
| Quote: | Applications that make a lot of memory allocations.
|
FastMM4 is especially useful for multithreaded applications on multi-cpu
machines, because it does not serialize allocations like the old memory
manager did.
This is where you will get huge performance gains (webbroker and websnap
in isapi mode are two examples).
Danny
---
|
|
| Back to top |
|
 |
Andrew Jameson Guest
|
Posted: Fri Dec 23, 2005 11:55 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Excellent responses ... many thanks ... I'd already made good use of some of
FastMM4's debug functionality ...
Andrew
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Tue Dec 27, 2005 12:49 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
| Quote: | It turned out that this works so well that Borland
not only decided to use FastMM as the new default memory manager
|
Can you give more details? I'm still using Delphi 5 mainly, and most of
my projects are using FastMM. What I'd like to know is:
1) What Delphi version are you talking about? When did Borland decide to
use FastMM as default memory manager?
2) What happens if I compile my Delphi 5 projects, with "uses FastMM4"
in the first line of the uses section, with newer versions of Delphi? Is
this line just unneccessary or has it any side effects?
Jens
--
Jens Gruschel
http://www.pegtop.net
|
|
| Back to top |
|
 |
Danijel Tkalcec [RTC] Guest
|
Posted: Tue Dec 27, 2005 12:51 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
I did some tests using D2006 with the new Default MM and it performed almost
the same as FastMM4 with FastMove. I'd say, if you are using D2006, you can
safely remove FastMM4 and FastMove from your "uses" list in the Project
file.
--
Danijel Tkalcec
http://www.deltasoft.hr/rtc/author.htm
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Tue Dec 27, 2005 1:14 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
| Quote: | I did some tests using D2006 with the new Default MM and it performed almost
the same as FastMM4 with FastMove.
|
So the new default MM was/is introduced in Delphi 2006?
| Quote: | I'd say, if you are using D2006, you can
safely remove FastMM4 and FastMove from your "uses" list in the Project
file.
|
So I better add some {$IFNDEF Delphi2006OrHigher} to the uses clause?
Jens
--
Jens Gruschel
http://www.pegtop.net
|
|
| Back to top |
|
 |
Danijel Tkalcec [RTC] Guest
|
Posted: Tue Dec 27, 2005 1:29 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
"Jens Gruschel" wrote:
| Quote: | I did some tests using D2006 with the new Default MM and it performed
almost the same as FastMM4 with FastMove.
So the new default MM was/is introduced in Delphi 2006?
|
Yes.
| Quote: | I'd say, if you are using D2006, you can safely remove FastMM4 and
FastMove from your "uses" list in the Project file.
So I better add some {$IFNDEF Delphi2006OrHigher} to the uses clause?
|
You can keep using FastMM4 and FastMove in D2006 also, it won't do you any
harm. But if you decide to move completely to D2006 and don't need to
compile your apps in older Delphi versions, you can remove those lines from
your projects.
If you want to, you can also $IFDEF those lines, it's your decision. I'm
only saying that you won't need to use FastMM4 and FastMove for projects
which you move to D2006 )
--
Danijel Tkalcec
http://www.deltasoft.hr/rtc/author.htm
|
|
| Back to top |
|
 |
Liz Guest
|
Posted: Fri Jan 13, 2006 6:11 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Jim Culbertson wrote:
| Quote: | Is possible to do leak checks without doing the above? From
Borland's FastMM demo program, I do know that if you set the global
variable "ReportMemoryLeaksOnShutdown:=true;" (declared in System
unit) you will be told of memory leaks, but provided with no
information about where they occur.
|
It does list the types, and I believe the logging will give more info
on where from
--
Liz the Brit
Delphi things I have released: http://www.xcalibur.co.uk/DelphiThings
|
|
| Back to top |
|
 |
Jim Culbertson Guest
|
Posted: Fri Jan 13, 2006 6:40 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Danijel Tkalcec [RTC] wrote:
| Quote: | "Jens Gruschel" wrote:
I did some tests using D2006 with the new Default MM and it performed
almost the same as FastMM4 with FastMove.
So the new default MM was/is introduced in Delphi 2006?
Yes.
I'd say, if you are using D2006, you can safely remove FastMM4 and
FastMove from your "uses" list in the Project file.
So I better add some {$IFNDEF Delphi2006OrHigher} to the uses clause?
You can keep using FastMM4 and FastMove in D2006 also, it won't do you any
harm. But if you decide to move completely to D2006 and don't need to
compile your apps in older Delphi versions, you can remove those lines from
your projects.
If you want to, you can also $IFDEF those lines, it's your decision. I'm
only saying that you won't need to use FastMM4 and FastMove for projects
which you move to D2006 )
|
I (a FastMM novice) found no way to do memory leak tests using what
Borland includes in D2006. To leak check I had to explicitly add FastMM
to the uses statement in my project file and place in my project folder
the files: FastMM_FullDebugMode.dll, FastMM4.pas, FastMM4Messages.pas,
and FastMM4Options.inc.
Is possible to do leak checks without doing the above? From Borland's
FastMM demo program, I do know that if you set the global variable
"ReportMemoryLeaksOnShutdown:=true;" (declared in System unit) you will
be told of memory leaks, but provided with no information about where
they occur.
|
|
| Back to top |
|
 |
Jim Culbertson Guest
|
Posted: Fri Jan 13, 2006 8:37 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Liz wrote:
| Quote: | Jim Culbertson wrote:
Is possible to do leak checks without doing the above? From
Borland's FastMM demo program, I do know that if you set the global
variable "ReportMemoryLeaksOnShutdown:=true;" (declared in System
unit) you will be told of memory leaks, but provided with no
information about where they occur.
It does list the types, and I believe the logging will give more info
on where from
Sounds reasonable, but how do you get it to log the leak results? |
|
|
| Back to top |
|
 |
Liz Guest
|
Posted: Fri Jan 13, 2006 9:17 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Jim Culbertson wrote:
| Quote: | Sounds reasonable, but how do you get it to log the leak results?
|
Its a setting in that inc file you spoke of
--
Liz the Brit
Delphi things I have released: http://www.xcalibur.co.uk/DelphiThings
|
|
| Back to top |
|
 |
Jim Culbertson Guest
|
Posted: Sun Jan 15, 2006 12:57 am Post subject: Re: FastMM4 - Memory Manager |
|
|
Liz wrote:
| Quote: | Jim Culbertson wrote:
Sounds reasonable, but how do you get it to log the leak results?
Its a setting in that inc file you spoke of
|
The FastMM memory manager that Borland supplies with D2006 includes no
inc file with which to change memory manager options.
The only way I've found to use FastMM to locate memory leaks is to
over-ride Borland's version of FastMM with the version of FastMM you can
download.
|
|
| Back to top |
|
 |
Liz Guest
|
Posted: Sun Jan 15, 2006 8:54 am Post subject: Re: FastMM4 - Memory Manager |
|
|
Jim Culbertson wrote:
| Quote: | The FastMM memory manager that Borland supplies with D2006 includes
no inc file with which to change memory manager options.
The only way I've found to use FastMM to locate memory leaks is to
over-ride Borland's version of FastMM with the version of FastMM you
can download.
|
which is what I did. Hunt down Pierre hes in some of the groups, he can
explain how if its possible without this. I believe you can set some
props inside your app as it is in the inc file.. and all goes well.
--
Liz the Brit
Delphi things I have released: http://www.xcalibur.co.uk/DelphiThings
|
|
| Back to top |
|
 |
Bill Mogk Guest
|
Posted: Sun Jan 15, 2006 2:17 pm Post subject: Re: FastMM4 - Memory Manager |
|
|
Jim Culbertson wrote:
| Quote: | Liz wrote:
Jim Culbertson wrote:
Sounds reasonable, but how do you get it to log the leak results?
Its a setting in that inc file you spoke of
The FastMM memory manager that Borland supplies with D2006 includes no
inc file with which to change memory manager options.
The only way I've found to use FastMM to locate memory leaks is to
over-ride Borland's version of FastMM with the version of FastMM you can
download.
|
Jim,
That is correct. I asked Pierre in the ....bdasm group about this. If
you look for a recent thread, started by me, he explains why.
Bill
|
|
| Back to top |
|
 |
|