Re: [AOLSERVER] new AOL-based thread-happy mem allocator in 8.4
On Tuesday 23 April 2002 19:22, you wrote: Hi, can you upload the patch to Source Forge? Of course. Is this patch something that makes it so AOLserver uses the traditional Tcl way of doing dlopen() and running Modulename_Init instead of us doing Ns_ModuleInit jobbage or are we talking about something else? No, I'm talking about something else... What I'm talking about is the mechanism the AOLserver is using to copy introspected Tcl command structures from the initial to the connection interpreter(s). The problem is: some Tcl commands may register delete callbacks, which are naively copied to every connection-thread interpreter by the AOLserver code in nsd/tclinit.c This of course results in memory trashing when all those (copied) commands are getting deleted on thread-exit. At that time, all their delete-callbacks are triggered, which may (and do) step on each other toes = memory trash. One of the solutions (which I made in the patch) was to *disable* auto-copying of commands with registered delete-callbacks. In order to handle those, however, I allowed the Tcl exension writer to register his *_Init procedure to be ran each time when the connection interpreter gets initialized. This is how the current Tcl thread extension works. IIRC, Jim (Davidson) made a note about this behaviour/problem in his presentations on the 7th Annual Tcl/Tk Conference (I may be wrong, though). I will post the patch for 3.4-series AOLserver to the SF repository. I'll try to get it for the 4.x as well. Cheers Zoran
Re: [AOLSERVER] new AOL-based thread-happy mem allocator in 8.4
On Tuesday 23 April 2002 08:00, you wrote: I have finally commited the improved memory allocator from the AOLServer Tcl mods to the 8.4 branch. Hey, I call this *very* good news ! This may also be the point to reconsider improving the AOLserver's way of dealing with Tcl-only extensions and copyiny command-sets from startup to connection threads. There are couple of design issues there which require AOLserver core patch to get some extensions (like XOTcl) to get loaded and used properly. I have the patch for that but I'd like to see wether it can be introduced in the core server, since it will ease the task of using arbitrary (thread-safe) Tcl extensions within AOLserver. Zoran Vasiljevic Archiware
Re: [AOLSERVER] new AOL-based thread-happy mem allocator in 8.4
On Tuesday 23 April 2002 08:00, you wrote: I have finally commited the improved memory allocator from the AOLServer Tcl mods to the 8.4 branch. ... This may also be the point to reconsider improving the AOLserver's way of dealing with Tcl-only extensions and copyiny command-sets from startup to connection threads. There are couple of design issues there which require AOLserver core patch to get some extensions (like XOTcl) to get loaded and used properly. I have the patch for that but I'd like to see wether it can be introduced in the core server, since it will ease the task of using arbitrary (thread-safe) Tcl extensions within AOLserver. AFAIK, what I commited takes care of all the known patches that AOLServer had against the Tcl core. I believe you should be able to use the AOLServer head with the Tcl core head without any mods to the Tcl core, or any funny bugs and the like. However, if there are some design level issues that may need improvement, do tell me. Jeff Hobbs The Tcl Guy Senior Developer http://www.ActiveState.com/
Re: [AOLSERVER] new AOL-based thread-happy mem allocator in 8.4
On Tuesday 23 April 2002 09:37, you wrote: AFAIK, what I commited takes care of all the known patches that AOLServer had against the Tcl core. I believe you should be able to use the AOLServer head with the Tcl core head without any mods to the Tcl core, or any funny bugs and the like. However, if there are some design level issues that may need improvement, do tell me. Not of that sort, though. The AOLserver does seed the the connection interpreter with commands introspected from within loaded initialized startup interpreter. It just copies (blindly) all command structures found in the initial interp, which causes quite a few problems with Tcl packages planting commands with associated delete callbacks. So the problem is not AOLserver-Tcl integration. The problem is how the AOLserver does handle Tcl extensions and their registered commands. There is nothing Tcl (you) can do about it. But there is something AOLserver (Kris/Jim/community) can do about. I've made a patch for 3.4 which corrects above problems. I'm just qurious to find out if/how/when can it be included in the core server distro. Hey, thanks for this memory allocator implementation! These (speed) issues have been bugging me for months. Zoran