----boundary-LibPST-iamunique-180651453_-_-
Content-type: text/plain
On Sun, 21 Nov 2004, Wojtek Skulski wrote:
> Inheritance references are static, while procedure variables are assigned
> at run time. Furthermore, even the number of procedure variables
> in a given module may not be known since procedure variables can be
> created dynamically. For example, imagine a type
>
> prVar = POINTER TO RECORD pv: PROCEDURE; next: prVar END;
>
> One can thus create a linked list of records, each one containing
> a reference to a procedure. In order to make unloading safe one needs
> to maintain those references versus unloading of modules that implement
> the "pv" fields.
On my second thought: the example above may lead to "dynamic imports" as
opposed to static imports that are known at compile time. My earlier
example with two modules TestUpper and TestLower could illustrate the
same idea. Namely, either a procedure variable or an object reference
from the module Upper gets installed in the hook variable declared in
module Lower, however, without statically importing the module Upper.
This means that at run time the module Lower contains references
to the module Upper. I would call it "dynamic import" because
the dependency was created at run time.
Now imagine Upper is unloaded. What happens if the hook variables are not
set to NIL but rather hold pointers to the unloaded code?
One solution might be that before a given module is unloaded, all
pointers in all other modules are traversed the same way as GC is doing
now, and in case a reference is encountered to the Upper code, it is not
unloaded but an error message is issued. The traversal should happen after
the CLOSE part of Upper is executed, because in all likelihood a sane
programmer has taken care of the problem by closing all references.
However, in order to prevent a dangling pointer still existing somewhere,
this last-minute check can be done. If Upper is still "dynamically
imported" from any place in the system, it is kept in memory.
I would not complain about the inefficiency of this solution, because if
we accept GC then we should also accept this. However, I am not sure if
this really solves the problem. I am also sure I am reinventing the wheel
here. This line of thought must be well known.
> I am sure one can invent even more vicious scenarios. My question still
> stands whether all this is safe in the current version of the run time
> system, and if not then whether it can be made safe. I am not yet buing
> into Fyodor arguments. Perhaps this problem has been solved already
> by the c.s. community. I simply do not know. I am only a user.
W.
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-180651453_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIE9uIFN1biwgMjEgTm92IDIwMDQsIFdvanRlayBT
a3Vsc2tpIHdyb3RlOlxwYXINClxwYXINCj4gSW5oZXJpdGFuY2UgcmVmZXJlbmNlcyBhcmUgc3Rh
dGljLCB3aGlsZSBwcm9jZWR1cmUgdmFyaWFibGVzIGFyZSBhc3NpZ25lZFxwYXINCj4gYXQgcnVu
IHRpbWUuIEZ1cnRoZXJtb3JlLCBldmVuIHRoZSBudW1iZXIgb2YgcHJvY2VkdXJlIHZhcmlhYmxl
c1xwYXINCj4gaW4gYSBnaXZlbiBtb2R1bGUgbWF5IG5vdCBiZSBrbm93biBzaW5jZSBwcm9jZWR1
cmUgdmFyaWFibGVzIGNhbiBiZVxwYXINCj4gY3JlYXRlZCBkeW5hbWljYWxseS4gRm9yIGV4YW1w
bGUsIGltYWdpbmUgYSB0eXBlXHBhcg0KPlxwYXINCj4gcHJWYXIgPSBQT0lOVEVSIFRPIFJFQ09S
RCBwdjogUFJPQ0VEVV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