The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

[WP34S] "Memory Leak" in Integrator?
Message #1 Posted by Les Wright on 15 May 2012, 3:18 a.m.

I don't often use the built-in integrator, preferring my own implementation of the PPC IG routine that has less stringent convergence criteria and thus is faster for my purposes. But tonight on fooling with the built-in I noticed on more than one occasion that when I interrupt an integration calculation (if I think it is going on too long for my liking). I seemed to "lose" 60 to 100 words of RAM (as confirmed with "STATUS") that I can't seem to recover with CLREG or PopLR, for example. Only an erase--ON-back-arrow-back-arrow--gets my orphaned memory back. Moreover, if I attempt to start over again and reattempt the integral I interrupt, odd things can happen--no display of interim results, or interim results out in left field in a problem that I know was solved quickly before, or failure to converge in a reasonable length of time on a problem that I know is an "easy" integral for the precision I have set.

Recently there was something with SLV and POPUSR creating this orphaned memory phenomenon. Could the same thing be happening with INTEGRATE?

Les

      
Re: [WP34S] "Memory Leak" in Integrator?
Message #2 Posted by Paul Dale on 15 May 2012, 3:42 a.m.,
in response to message #1 by Les Wright

It is possible that integrate could lose memory -- seems unlikely however -- it is no different to solve in this respect.

The integrator allocates 88 words of RAM for local registers. These will appear used from you user routine. I doubt PopLR will recover them -- some lengths are gone to to hide the xrom state from the user.

When you restart, the stack should be cleared (if you start with an XEQ, not with R/S).

- Pauli

            
Re: [WP34S] "Memory Leak" in Integrator?
Message #3 Posted by Les Wright on 15 May 2012, 4:03 a.m.,
in response to message #2 by Paul Dale

Quote:
When you restart, the stack should be cleared (if you start with an XEQ, not with R/S).

Yup, that does it. If I run the program I am attempting to integrate with XEQ, passing it a valid argument, the claimed RAM goes back to the heap and the next time I run integrate it works properly. However, if I DON'T do this after interrupting an integration with R/S or EXIT, the integrator may not behave well--for example, if the display just shows "Running Program" instead of the integral sign = interim results, I know that something is not going well.

Les

                  
Re: [WP34S] "Memory Leak" in Integrator?
Message #4 Posted by Marcus von Cube, Germany on 15 May 2012, 3:43 p.m.,
in response to message #3 by Les Wright

A RTN from the keyboard should work as well.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall