Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!utnut!cs.utexas.edu!uunet!decwrl!decwrl!csus.edu!sfsuvax1.sfsu.edu!vpcsc4
From: vpcsc4@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Questions about dynamic loading
Message-ID: <1993May17.045847.19218@csus.edu>
Sender: news@csus.edu
Organization: San Francisco State University
Date: Mon, 17 May 1993 04:58:47 GMT
Lines: 51


I have a few questions about dynamic loading. 

As an aside, I'll mention that I found the following
sources of publically information on dynamic loading:

  
   1) From gatekeeper.dec.com in /pub/usenet/comp.sources/
      volume1 and volume14, dynamic.c and bsd-dyna-link
      are available.  These are generic unix hacks. Each
      comes along with some  *.c and *.h files and an
      easy to follow example.  Someone without an understanding
      of what these programs really do could follow the 
      examples and "implement" dynamic loading.
     
   2) From parc.xerox.com in /pub/prc, an extensive library
      for dynamic loading and some other esoteric stuff
      used to support the Xerox language Cedar.
      If you're not programming on a SUN , or if you don't
      really know about what you are doing this is not for
      you. (The first thing you have to do is make the makefile
      work on your system). On the other hand, this is a gold mine if
      you do know what you are doing.

   and

   3) A hack on dynamic loading for S to C hacks at STATLAB.
      Not much here one can pirate.

Now, the questions. When dynamic loading is implemented can (and
also does) one create an associative memory table for all *.o files 
for the current application at one time, or does the programmer typically
handle all the dynamic loading in his functions, freeing them once they've
been used? That is, when a programmer knows functions a,b, and c  are 
going to be used, does his code which calls a,b, and c, load these functions
into memory and then implementing his algorithm and free a,b, and c?
This looks like the case to me, and thus, it looks like implementing
DL in J would not be an easy task considering the functional nature of the
language.

BTW, what is the connection between dynamic loading and dynamic linking?

Also, the documentation does not mention much about how dynamic loading
enhances system performance, but instead mentions how these hacks
are useful for applications like debuggers. What kind of performance 
enhancement would one expect to see with a dynamically loaded version of J?

Emmett



