[fpc-devel] BPL Package Questions

L L at z505.com
Mon Sep 17 03:20:10 CEST 2007


http://wiki.freepascal.org/packages

"PPUMove
ppumove is a standalone binary in the FPC distribution that creates a shared
libs from already compiled units. As far as I can see, this is already the 
beginning of a package system, except that it is manual (create packages 
manually yourself). This support and the makefile targets mostly dates back 
to the late 0.99.x/1.0.x series. (already before fpcmake)

The RTL (on linux only?) makefile has a "shared" target, and Florian says it
should be possible to create a shared lib of the rtl by running make clean 
all CREATESHARED=1 on Linux. Non x86_32 Linux needs the units to be compiled 
with PIC though, but the makefile seems to already add -Cg this for non 
x86_32. "

I remember once Florian said he was able to compile lazarus with packages using
PPUMOVE.

How does shared memory work between DLL's though? i.e. ansistrings, RTTI,
Dynamic arrays, reference counting?

Is memory shared across DLL/EXE like I do with SetMemoryManager in this demo:
http://www.freepascal.org/contrib/delete.php3?ID=543

(but with fp package system it is just transparent/hidden somewhere?)

How can PPUMOVE/RTL possibly know about sharing memory magically? Where does
that magic occur? During initialization/finalization of the system unit with a
SetMemoryManager() call so the DLL shares the EXE memory?  

What does the CREATESHARED parameter do magically? 

And finally, when will I stop asking overwhelming questions and calm down?

Lars




More information about the fpc-devel mailing list