chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] reload .so in csi?


From: Felix
Subject: Re: [Chicken-users] reload .so in csi?
Date: Mon, 04 Jul 2011 10:35:04 +0200 (CEST)

From: Peter Bex <address@hidden>
Subject: Re: [Chicken-users] reload .so in csi?
Date: Mon, 4 Jul 2011 09:12:21 +0200

> On Fri, Jul 01, 2011 at 04:21:05PM -0400, David N Murray wrote:
>> > That is probably the best solution.  The other solution is to use (load
>> > "foo.so") but it may not work on all platforms.  (I sent that last bit
>> > in private mail but forgot to copy the list)
>> 
>> (load "foo.so") appears to do the same thing as
>> #;4> ,l foo.so
>> ; loading foo.so
>> #;4>
>> 
>> but, the new function I'm exporting still isn't visible, so it doesn't
>> look like changes are being picked up.
> 
> That sounds like you're loading a file with a module in it.  If you
> change the module definition, you will need to import it again after
> loading.  LOAD simply reloads the module, but doesn't affect
> the identifiers already imported previously in your running code.
> 

I think David just refers to normal compiled code. Regardless of modules,
shared objects should not be reloaded. The Linux-based reloading code
has been removed now, because compiled C code can not be reliably unloaded
(some live closure may still refer to a C function in that .so).

A straightforward solution is simply to use a different name
("xxx.so1", "xxx.so2", ...).  This uses up storage, but should be ok
unless done excessively (the unused text segments will be swapped out
and the amount of dynamic memory consumed is not much).


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]