HP Forums
[WP34S] "Memory Leak" in Integrator? - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: [WP34S] "Memory Leak" in Integrator? (/thread-221543.html)

[WP34S] "Memory Leak" in Integrator? - Les Wright - 05-15-2012

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?


Re: [WP34S] "Memory Leak" in Integrator? - Paul Dale - 05-15-2012

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? - Les Wright - 05-15-2012

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.


Re: [WP34S] "Memory Leak" in Integrator? - Marcus von Cube, Germany - 05-15-2012

A RTN from the keyboard should work as well.