Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

 
Patricia Morman
Occasional Advisor

LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

I have found that calls to LIB$INIT_DATE_TIME_CONTEXT in an external function causes a process to grow continually until I get the message "Maximum Memory Exceeded." I'm using BASIC. Making the calls in the main program is fine, but in an external function the process grows and grows. I'm in the middle of a big project and this has me dead in the water. Any help would be appreciated. Thanks!
8 REPLIES 8
Hoff
Honored Contributor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

Guess: You're probably missing a corresponding call to the LIB$FREE_DATE_TIME_CONTEXT routine to free the context. Calls that are not paired will leak memory.
Patricia Morman
Occasional Advisor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

Good Guess! That did the trick. Thanks so much!!
Steven Schweda
Honored Contributor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

I know nothing, but I see

http://h71000.www7.hp.com/doc/82final/5932/5932pro_029.html

where it says:

Condition Values Returned
[...]
Any condition value returned by LIB$GET_VM or LIB$ANALYZE_SDESC.

and LIB$GET_VM suggests to me that it's
allocating some VM. Perhaps you need to be
freeing something somewhere. (I don't see
what, however.) Or not calling this thing
repeatedly?
Patricia Morman
Occasional Advisor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

If thou call LIB$INIT_DATE_TIME_CONTEXT thou shalt also call LIB$FREE_DATE_TIME_CONTEXT. You saved my bacon. Thanks!
Steven Schweda
Honored Contributor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

Note that on that same Web page, the
explanation of LIB$INIT_TIMER mentions
LIB$FREE_TIMER ("You need to call
LIB$FREE_TIMER [...]), but you don't get any
corresponding help with
LIB$INIT_DATE_TIME_CONTEXT.

I assume that it would be a waste of time and
effort, but one could try reporting this to
the VMS documentation people.
Patricia Morman
Occasional Advisor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

Yes, I had looked up the INIT command specifically because I wondered if I had to explicitly release the memory and it mentionned nothing about the FREE conterpart.
Jon Pinkley
Honored Contributor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

It is hard to tell if reporting documentation errors is worth while or not.

I sent a report to openvmsdoc@hp.com on Dec 3, 2009 concerning incorrect information in the system manager's manual.

The mail did not bounce, but I never got any acknowledgment that anyone had received the mail.

It is definitely a dis-incentive to spending the time to report errors whent there is absolutely no feedback.

Ideally there should be an online errata for manuals, and the online PDF and html should be updated (with a revision number) so the online manuals are always as accurate as possible. They should keep the base level (what was "shipped") and the latest revision onlline.

I still remember replacing pages in the 3 ring binders when a point release came out for the Blue Wall and Orange Wall editions. I am not sure if they issued replacement pages for the Gray Wall edition or not.
it depends
Jon Pinkley
Honored Contributor

Re: LIB$INIT_DATE_TIME_CONTEXT in External Function causes Process to Continually Grow

Well it does appear that someone from HP is reading either this thread or the mail sent to openvmsdoc@hp.com, because I did get a response back on Dec 18th, concerning the mail I sent on Dec 3rd.

So it is worth reporting documentation errors.

Jon
it depends