From: Rafael L. <lab...@ps...> - 2003-02-08 21:38:43
|
* João Cardoso <jc...@fe...> [2003-02-07 14:51]: > I measure the time that your code in plInitDispatchTable() takes to load > all drivers, and it is only 20ms (wall clock) for all 33 drivers, on a > P3@700MHz (with a small but continuous load of 1). It looks like it is > pretty efficient. > > Your concerns that dlopen() would load all libraries that a driver needs > does not apply, as this would only happens if some drivers code is > executed, which is not the case. As libtool's info says: > > "Unresolved symbols in the module are resolved using > its dependency libraries" > > As the symbols you are looking for are in the modules, no further > loading will occur. > > Thus, given that the current implementation is efficient enough, avoids > the need of another program to build the drivers.rc file, is fully > dynamic because if more drivers are added to the directory they will be > recognized without further intervention,... lets keep it as is. Thanks for addressing those two points which I was too lazy to evaluate (efficiency and loading of libraries). Although I am not totally happy with the current implementation, I will keep it as is for now. I am pretty convinced that the memory management problems that you had when using lt_dlclose come only from the libltdl code (use of a private realloc along with a system's malloc). This has been discussed in the libtool mailing list and fixed in the libtool's cvs tree. There are good news here: version 1.5 is coming soon: http://mail.gnu.org/archive/html/libtool/2003-02/msg00014.html Next step: Debian packages. -- Rafael |