HP Forums

Full Version: [WP34S] "Memory Leak" in Integrator?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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

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

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

A RTN from the keyboard should work as well.