Dear Gustav,

                I understand your concerns about Tcl_Finalize. but it is
called just when the process/service is about to end.

Once it ends the OS takes charges and releases the process/service resources
(memory included).

You can make an easy test.. Have Aolserver / nsd running on a big
application. observe the OS resources given to the process

and released when I finishes. Do this twice: with Tcl_Finalize on and
Tcl_Finalize commented out. And see if you can find any difference.

Ciao,

Maurizio

 

 

From: Gustaf Neumann [mailto:neum...@wu-wien.ac.at] 
Sent: 05 August 2011 15:52
To: Maurizio Martignano
Cc: 'AOLserver Discussion'
Subject: Re: [AOLSERVER] Aolserver Progress - Some few examples....

 

Dear Maurizio,

i guess, everything is fine with you with the head version on sourceforge.



For me, it is still unclear, why 4.5.1 worked for you, but not the head
version not. As far i can see,
all socket usages were int the same way in 4.5.1, the variable triggers in
nsd.h was defined like this at least since 2004. Maybe it was "luck" that
the win version worked in 4.5.1 (different memory layout, different
compilers / compiler options, ...)
[MM] No.. Just Alzheimer. Me. When I first did the compilation I spotted the
problem and I fixed it by changing int trigger[2] into SOCKET trigger[2].
Then I forgot completely about it.. Then the issue showed up again... when I
downloaded the code again..

ok, this explains it.



===> If one does no Tcl_Finalize() one introduces a memory leak.

[MM] The process/service is about to end anyhow. I believe that mo matter
what the poor process/service does all its memory will be released by the
OS. So this is not an issue.

Tcl_finalize shuts down Tcl; it calls the registered exit handlers and then
it shuts down various Tcl subsystems. It is certainly not recommended to to
omit, but i have not checked the exact consequences for aolserver. If it
hangs, it is an indication that there is still something wrong in tcl and/or
aolserver. Keep an eye open in this respect.




nsproxy/nsproxy.c
-    Tcl_FindExecutable(argv[0]);

===> The call to Tcl_FindExecutable() is required (at least in Tcl 8.5),
otherwise tcl will crash (at least under unix like operating systems)




[MM] Not my change, please look at my newest email and sorry if I cause you
some inconvenience.

It was included in your first patch (maybe erratic). If this is not needed,
fine.

All the best, and many thanks for the feedback
-gustaf neumann



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to