Subj : Slow Startups...
To   : Murray Lesser
From : mark lewis
Date : Sat Nov 03 2001 03:32 am

* Crossposted to OS2
* Crossposted to OS2REXX


i'm crossposting this to OS2REXX as it is definitely on topic in there and
OS2PROG as well as it seems to be something that would also be covered in the
more generic programming area... not to mention that those areas could use the
traffic that this discussion will/can bring...

ML> Your second suggested statement enables all the
ML> RexxUtil "external functions" for the program
ML> within which it was called.  The "CALL SysLoadFuncs"
ML> statement "loads" REXXUTIL.DLL, only if that is
ML> the first call to any external function within
ML> REXXUTIL.DLL by any running REXX program in the
ML> system (otherwise, it has already been loaded).

keeping this in mind... read on...

[trim]

ML> "SyDropFuncs" is a vary dangerous function to use
ML> in a REXX program.  It is a "global" function.  If
ML> it is called by any active REXX program, it will
ML> drop any RexxUtil "external function" in use by any
ML> REXX program running in any OS/2 session.

for some reason, i'm remembering that this isn't the way... i'm remembering
that the system will _not_ unload the functions and/or dlls unless there are no
other tasks using them... in otherwords, there is (sort of?) an INUSE counter
that is incremented each time a task loads the function/dll... the function/dll
won't be unloaded until that counter is back to one or zero... i suspect back
to one as the rexx program itself would be that one...

my understanding about rexx (and many other coding stuffs) is that it is better
to always load what you need in the program and then to unload it afterwards...
the system will handle loading it if it isn't already loaded by some other
process and will also handle unloading it if it is not used by any other
processes, but you have to make the calls yourself each time...

even in my pascal days (still code most of my stuff in pascal, FWTW <smile>), i
always did both parts of whatever process i was working with... never relying
on the system to free up allocated memory when the program ended, for one
common example...

am i missing something?? if so, what and why??

oh yeah, we're definitely gonna have to watch the quoting initials...
especially if mike luther joins us <<GG>> three ml's talking together can get
confusing <<wink wink>>

)\/(ark


* Origin: (1:3634/12)