[fpc-devel]Bad heap manager?

Peter Vreman peter at freepascal.org
Thu Feb 28 07:59:58 CET 2002


> Hello All,
> 
> Today I tried to use FPC 1.1 (Win32 target) to compile my program which
> creates very many dynamic objects and also I compiled the same program with
> Delphi 6. Delphi-compiled program was much faster and, IMHO, that was because
> Delphi uses another heap manager (while running FPC-compiled version, an intensive
> swapping occurs, unlike Delphi-compiled version). Also I modified cmem.pp from Packages
> to test my program using C heap functions under Win32.
> 
> Benchs on K62-500 (W'NT 4):
> FPC-compiled, native heap: from <1 ms to >2 min;
> FPC-compiled, using slightly modified cmem.pp from Packages (heap manager
>               from msvcrt40.dll): 2.5-9 s;
> FPC-compiled, using slightly modified cmem.pp from Packages (heap manager
>               from crtdll.dll): 1.5-9 s;
> Delphi6: <1-10 ms(!)
> 
> I'm shocked after these results! IMHO, multi-platform FPC heap manager
> is not effective for win32 target. I can only hope that this my
> program is not correctly written.

Try to recompile the compiler with Delphi and you'll see that the FPC heap manager is a
lot faster than the Delphi heap manager.

> 
> I could send my unfortunate program (the day after tomorrow) but it is relatively big.

Can you send it to me







More information about the fpc-devel mailing list