[fpc-devel] Why/how does the compiler have a non-trivial numberofmemory leaks after over two decades of development?

J. Gareth Moreton gareth at moreton-family.com
Mon Jul 30 19:55:53 CEST 2018


 Correct me if I'm mistaken, but I believe one shortcoming with the Free
Pascal Compiler, despite its speed, is that it isn't multi-threaded.  It
can't compile multiple independent units at once, and probably won't be
able to for a while due to the use of global variables in the node
builder.  When it comes to building Lazarus and the compiler, this is
gotten around by the Makefiles running several instances of the compiler on
different processes, building independent packages that can later be
linked.
 I personally think that if the compiler can be made multi-threaded, then
projects like OpenSceneGraph might see a huge improvement in compile times
if the compiler is smart enough to identify units that don't depend on each
other and compile them in parallel.  I'm not sure how cross-compatible it
can be made, since different platforms approach multithreading in different
ways and I've noticed that the compiler tends to avoid using SysUtils and
Classes and the like (so no using TThread for now).

 This is getting a bit off-subject from fixing memory leaks though.
 Gareth aka. Kit

 On Mon 30/07/18 19:39 , wkitty42 at windstream.net sent:
 On 07/30/2018 11:35 AM, Michael Van Canneyt wrote: 
 > On Mon, 30 Jul 2018, R0b0t1 wrote: 
 >> It might be hard to imagine FPC taking that much longer than it does 
 >> currently but ~30min for a large program is the standard with other 
 >> compilers. I very much enjoy the speed of FPC. > 
 > 30 *Minutes*, is this real ? 

 yep, for sufficiently large projects... when we compile OSG
(OpenSceneGraph) 
 over here (using -j 8) it takes 20+ minutes for the first time or if we 
 reconfigure from debug to release mode or the other way around... 

 now, after the first time we compile it, the next times takes mere 10's of

 seconds... then we move on to SceneGear and FlightGear when we're building
that 
 whole project which uses OSG... 30-45 minutes for a complete, from the
ground up 
 builds are not uncommon... it takes me back to the days of 30 years ago
when 
 you'd start the (borland/turbo pascal) compile process and go get some
c0ffee ;) 

 note: the machines these builds are being done on have 16Gig RAM, 1Tb HD,
and a 
 4Ghz 8-core AMD FX-8350 CPU... 

 -- 
 NOTE: No off-list assistance is given without prior approval. 
 *Please keep mailing list traffic on the list unless* 
 *a signed and pre-paid contract is in effect with us.* 
 _______________________________________________ 
 fpc-devel maillist - fpc-devel at lists.freepascal.org [1] 
 http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[2]">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel 

 

Links:
------
[1] mailto:fpc-devel at lists.freepascal.org
[2] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180730/572a6a3c/attachment.html>


More information about the fpc-devel mailing list