Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

50G - sporadic pauses - garbage collection ?

121 views
Skip to first unread message

jrc

unread,
Sep 5, 2007, 10:34:15 PM9/5/07
to
My HP-50G frequently goes into sporadic delays when executing
keyboard functions or recalling variables. Is this garbage
collection?

I've installed fresh batteries - makes no difference.

Dick Chaffer
Bozeman, MT

Graywolf

unread,
Sep 5, 2007, 11:58:23 PM9/5/07
to
I've noticed that too sometimes. I don't know what causes it.
Especially when switching between soft menus.

John H Meyers

unread,
Sep 6, 2007, 2:35:15 AM9/6/07
to
On Wed, 05 Sep 2007 21:34:15 -0500:

> My HP-50G frequently goes into sporadic delays
> when executing keyboard functions or recalling variables.
> Is this garbage collection?

Back when I lived in New York, the Garbage Collectors
sometimes went on strike, causing an even greater
(and more uncomfortable) delay :)

> I've installed fresh batteries - makes no difference.

How often, and what value is returned by MEM?

Are the batteries making firm contact with those
springy things in the battery compartment?

If it is due to GC, rather than to other causes, then a strategy
can be employed to cause more frequent (but shorter) cleanups,
similar to the strategy of doing some chore a little bit every day,
rather than waiting until you have to drop everything for a whole day,
just to catch up with a big load that has been left to accumulate.

The very small program below is called FMEM,
and it accepts as an argument how much memory (bytes)
you want to leave _free_

If you leave 256K free, then you wait a long time between GCs,
but each GC takes a longer time, whereas if you leave 32K free,
you still have plenty of free memory and will not run out of memory,
but the system will do a much shorter GC at more frequent intervals.

"Smoothing out the workload" in this fashion
gives especially noticeable relief from long pauses in the slower machines,
e.g. original HP48[S/G] and original HP49G (before 49G+/50G/etc.)

If you store lots more stuff in RAM, using up the memory
which you had left free, you can re-run FMEM whenever you want,
to set the amount of free memory back up again to a comfortable margin.

To free the maximum amount of available memory, request 1 EEX 7 bytes,
or any amount greater than the amount of RAM which actually exists
(the exact amount actually left free is always returned as a result).

Here is an updated FMEM for all members of HP49/50 series:
(do HOME 256 ATTACH _before_ downloading or typing the program,
because MAKESTR needs built-in library 256 to compile properly)

@ HP49/50 series only
\<< 5000. MAX :0:JUNK DUP PURGE MEM ROT -
IF DUP 0. > THEN MAKESTR SWAP STO
ELSE DROP2 END 0. DROP MEM \>> 'FMEM' STO


Here is an updated FMEM for original HP48[S/G][X/+] only:
(try it if you've got 128K or "merged" 256K):

@ HP48S[X]/HP48G[X/+] only
\<< 5000 MAX :0:JUNK DUP PURGE MEM ROT -
IF DUP 0 > THEN "" SWAP 2 *
#18CEAh SYSEVAL #61C1Ch SYSEVAL
SWAP STO ELSE DROP2 END 0 DROP MEM \>> 'FMEM' STO

The standard precaution applies (especially to the HP48 version,
which employs internal system function addresses,
errors in usage of which can cause a crash or memory clear):

"Back up your memory before trying any new program"

The last prior version of FMEM was posted five years ago
(when all available models ran on slower, real "Saturn" CPUs)
http://groups.google.com/group/comp.sys.hp48/msg/7e02a86e62c86abf?dmode=source

[r->] [OFF]

John H Meyers

unread,
Sep 6, 2007, 2:39:03 AM9/6/07
to
On Thu, 06 Sep 2007 01:35:15 -0500:

> How often, and what value is returned by MEM?

This meant "how often does the delay occur"
(not how often changing batteries :)

[r->] [OFF]

John H Meyers

unread,
Sep 6, 2007, 4:25:19 AM9/6/07
to
On Wed, 05 Sep 2007 21:34:15 -0500:

> My HP-50G frequently goes into sporadic delays

Other possible causes:

o Viewing (or even listing) SD card contents.

o Spontaneous re-organizing of user "flash" memory (Port2).

o Inadvertently running a program or keyboard function.

o Loose battery connection?

o Internal intermittent connection?

o Alien space/time warp fields (are you near "Area 51"?)

[r->] [OFF]

Graywolf

unread,
Sep 6, 2007, 9:38:46 AM9/6/07
to
Ah! I think your first post answered the question, at least for me.
Thanks!

jrc

unread,
Sep 6, 2007, 11:15:31 AM9/6/07
to
Wow - thanks again, John; I'll work thru this today, but I
suspect you're right on, again, again.

Dick Chaffer

0 new messages