[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANNOUNCE] Lua 5.0 (pre-release) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 02 Apr 2003 15:47:01 -0300
> > Some platforms may not allow loaded objects to reference symbols in the
> > main program at all; I think AIX is or was such a platform.
>
> As is Windows.
I am not a Windows expert, but as far as I know, this is not completely
true. In Linux (and I guess all Unix) there is no problem if a program
uses multiple copies of the same code; equal code means equal results.
So, there is no difference whether a loaded object shares the Lua code
from the main program or loads its own copy.
In Windows, blocks created by a dll cannot be free in a different dll
(is that right?), even if both dlls contain exactly the same code.
So, to avoid problems in Windows, the "correct" way to use loaded
objects is to make Lua itself a dll loaded by the main program,
so that the main program, Lua, and any extra module all share a single
copy of Lua.
(I guess...)
-- Roberto