Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-09

TLCLMemanager

12 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

Hi,

The LCL contains the non-visual unit LCLMemManager: http://svn.freepascal.org/svn/lazarus/trunk/lcl/lclmemmanager.pas I would like to propose that you rename it and add it to the FCL.

It contains some simple (base) clasess for pooling records and objects.

For the binary trees benchmark at
http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&lang=all I wrote an alternative using the TLCLNonFreeMemManager. The alternative runs in 40% of the time of the original and uses less memory.

Vincent

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 12 lines
Hi, The LCL contains the non-visual unit LCLMemManager: http://svn.freepascal.org/svn/lazarus/trunk/lcl/lclmemmanager.pas I would like to propose that you rename it and add it to the FCL. It contains some simple (base) clasess for pooling records and objects. For the binary trees benchmark at http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&lang=all I wrote an alternative using the TLCLNonFreeMemManager. The alternative runs in 40% of the time of the original and uses less memory.

If the lazarus people agree with this, I see no problem in doing so. What name would you suggest ?

Michael.

Reply by email

Vincent Snijders
to Michael Van Canneyt
Michael Van Canneyt wrote 17 lines
On Fri, 29 Sep 2006, Vincent Snijders wrote: > Hi, > > The LCL contains the non-visual unit LCLMemManager: > http://svn.freepascal.org/svn/lazarus/trunk/lcl/lclmemmanager.pas > I would like to propose that you rename it and add it to the FCL. > > It contains some simple (base) clasess for pooling records and objects. > > For the binary trees benchmark at > http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&lang=all > I wrote an alternative using the TLCLNonFreeMemManager. The alternative runs > in 40% of the time of the original and uses less memory. If the lazarus people agree with this, I see no problem in doing so.

I think they will agree, but I will ask to make sure.

What name would you suggest ?

A name change because of the LCL in the name. But just TMemManager is too generic, IMHO.

What about TMemoryPool and TNonFreeMemoryPool?

Vincent

Reply by email

Vincent Snijders
to Vincent Snijders
Vincent Snijders wrote 6 lines
Michael Van Canneyt schreef: > > > If the lazarus people agree with this, I see no problem in doing so. I think they will agree, but I will ask to make sure.

Mattias, who wrote the unit, agrees.

Vincent

Reply by email

Michael Van Canneyt
to Vincent Snijders: I think they will agree, but I will ask to make sure. A name change because of the LCL in…
Vincent Snijders wrote 28 lines
Michael Van Canneyt schreef: > > On Fri, 29 Sep 2006, Vincent Snijders wrote: > > > Hi, > > > > The LCL contains the non-visual unit LCLMemManager: > > http://svn.freepascal.org/svn/lazarus/trunk/lcl/lclmemmanager.pas > > I would like to propose that you rename it and add it to the FCL. > > > > It contains some simple (base) clasess for pooling records and objects. > > > > For the binary trees benchmark at > > http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&lang=all > > I wrote an alternative using the TLCLNonFreeMemManager. The alternative > > runs > > in 40% of the time of the original and uses less memory. > > If the lazarus people agree with this, I see no problem in doing so. I think they will agree, but I will ask to make sure. > What name would you suggest ? A name change because of the LCL in the name. But just TMemManager is too generic, IMHO. What about TMemoryPool and TNonFreeMemoryPool?

Don't you think the word MemoryManager (MM) should be in it ? like pooledmm ? (and class TPooledMemoryManager) ?

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt
Show quoted text 37 lines
On Fri, 29 Sep 2006, Vincent Snijders wrote: > Michael Van Canneyt schreef: > > > > On Fri, 29 Sep 2006, Vincent Snijders wrote: > > > > > Hi, > > > > > > The LCL contains the non-visual unit LCLMemManager: > > > http://svn.freepascal.org/svn/lazarus/trunk/lcl/lclmemmanager.pas > > > I would like to propose that you rename it and add it to the > > > FCL. > > > > > > It contains some simple (base) clasess for pooling records and > > > objects. > > > > > > For the binary trees benchmark at > > > http://shootout.alioth.debian.org/gp4/benchmark.php?test=binarytrees&lang=all > > > I wrote an alternative using the TLCLNonFreeMemManager. The > > > alternative runs > > > in 40% of the time of the original and uses less memory. > > > > If the lazarus people agree with this, I see no problem in doing > > so. > > I think they will agree, but I will ask to make sure. > > > What name would you suggest ? > > A name change because of the LCL in the name. But just TMemManager > is too generic, IMHO. > > What about TMemoryPool and TNonFreeMemoryPool? Don't you think the word MemoryManager (MM) should be in it ?

This could cause confusion with TMemoryManager.

like pooledmm ? (and class TPooledMemoryManager) ?

Mattias

Reply by email

Vincent Snijders
to Mattias Gaertner: On Fri, 29 Sep 2006 16:32:23 +0200 (CEST) This could cause confusion with TMemoryManager.…
Mattias Gaertner wrote 19 lines
On Fri, 29 Sep 2006 16:32:23 +0200 (CEST) Michael Van Canneyt wrote: > > On Fri, 29 Sep 2006, Vincent Snijders wrote: > >> Michael Van Canneyt schreef: >>> On Fri, 29 Sep 2006, Vincent Snijders wrote: >>> >>>> Hi, >>>> >>>> The LCL contains the non-visual unit LCLMemManager: >>>> http://svn.freepascal.org/svn/lazarus/trunk/lcl/lclmemmanager.pas >>>> I would like to propose that you rename it and add it to the >>>> FCL. >>>> >>>> It contains some simple (base) clasess for pooling records and >>>> objects. >>>>

<snip>

Show quoted text 11 lines
>>> What name would you suggest ? >> A name change because of the LCL in the name. But just TMemManager >> is too generic, IMHO. >> >> What about TMemoryPool and TNonFreeMemoryPool? > Don't you think the word MemoryManager (MM) should be in it ? This could cause confusion with TMemoryManager. > like pooledmm ? (and class TPooledMemoryManager) ?

I agree with Mattias. It is not a replacement for TMemoryManager like cmem.

A clean up of the unit has taken place, so it is ready for moving to the FCL.

Vincent

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 11 lines
> > > What about TMemoryPool and TNonFreeMemoryPool? > > Don't you think the word MemoryManager (MM) should be in it ? > > This could cause confusion with TMemoryManager. > > > > like pooledmm ? (and class TPooledMemoryManager) ? I agree with Mattias. It is not a replacement for TMemoryManager like cmem. A clean up of the unit has taken place, so it is ready for moving to the FCL.

Ok, can you send me a sample demo app ? Then I'll copy it, and add the sample application.

Michael.

Reply by email

Vincent Snijders
to Michael Van Canneyt
Michael Van Canneyt wrote 21 lines
On Tue, 3 Oct 2006, Vincent Snijders wrote: >>>>What about TMemoryPool and TNonFreeMemoryPool? >>> >>>Don't you think the word MemoryManager (MM) should be in it ? >> >>This could cause confusion with TMemoryManager. >> >> >> >>>like pooledmm ? (and class TPooledMemoryManager) ? > >I agree with Mattias. It is not a replacement for TMemoryManager like cmem. > >A clean up of the unit has taken place, so it is ready for moving to the FCL. Ok, can you send me a sample demo app ? Then I'll copy it, and add the sample application.

Yes, I will adapt
http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgid=126 to compile against new unit.

Did you check it in and changed its name?

Vincent

Reply by email

Michael Van Canneyt
to Vincent Snijders
Vincent Snijders wrote 28 lines
Michael Van Canneyt wrote: > > On Tue, 3 Oct 2006, Vincent Snijders wrote: > > > > > > >What about TMemoryPool and TNonFreeMemoryPool? > > > > > > > >Don't you think the word MemoryManager (MM) should be in it ? > > > > > >This could cause confusion with TMemoryManager. > > > > > > > > > > > > >like pooledmm ? (and class TPooledMemoryManager) ? > > > >I agree with Mattias. It is not a replacement for TMemoryManager like cmem. > > > >A clean up of the unit has taken place, so it is ready for moving to the > >FCL. > > > Ok, can you send me a sample demo app ? Then I'll copy it, and add the > sample application. Yes, I will adapt http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgid=126 to compile against new unit. Did you check it in and changed its name?

Not yet. First the sample. I want to do it all in 1 SVN commit. I'll use pooledmm and TPooledMemoryManager as suggested.

Michael.

Reply by email