...
> * If I recall, you can load it in a tcl script by doing
>
> ns_eval [list load /path/to/file.so]
>
> one time, and it will exist in all interpreters.  Of course, you'll
> probably want to wrap this up so that it doesn't get loaded every time.

FWIW, Tcl's load command actually caches pathnames of files that
it loads to ensure it is only loaded once.  However, the Pkg_Init
call will be called as many times as you "load" something.  This
is similar to Windows' LoadLibrary caching behavior - it will load
it twice if you use different pathnames (like through different
mount points), as they could be separate libraries.

This is just to say you are somewhat safe from having the library
loaded 1000 times in memory.  You still want to use the correct
ns_ calls to ensure that you only init the library in the interp
as few times as possible (ideally once per interp of course).

Jeff

Reply via email to