home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp48
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!mercury.unt.edu!sol!cgw
- From: cgw@sol.acs.unt.edu (christopher williams)
- Subject: Re: Strange Memory Loss
- Message-ID: <cgw.722377081@sol>
- Originator: cgw@sol.acs.unt.edu
- Sender: usenet@mercury.unt.edu (UNT USENet Adminstrator)
- Organization: University of North Texas
- References: <cgw.722287417@sol> <1ejq7bINNgem@uwm.edu> <cgw.722303141@sol> <1elm1lINNs9i@lily.csv.warwick.ac.uk>
- Date: Sat, 21 Nov 1992 20:18:01 GMT
- Lines: 51
-
- In <1elm1lINNs9i@lily.csv.warwick.ac.uk> phudl@csv.warwick.ac.uk (Mr S J Liddicott) writes:
- >I find that MEM does not do carbage collection at all.
- >If I do lots of MEMs in succession, on of them gives a suddenly
- >much higher (probably the true) value.
-
- yep, that's gc at work. think about it: if you have LAST STACK, ARG,
- and CMD all enabled, they're going to suck up a little bit of memory.
- by typing MEM repeatedly, you replace what _used_ to be in those,
- and as soon as everything holds MEM (or a result thereof), you
- get a slightly bigger value. [at least, that's the theory *i've*
- always used to explain why that happens]
-
- for example, here's a list of the values i get when i type
- MEM, record it, then DROP the result a few times:
-
- 8457.5
- 8433
- 8411
- 8411
-
- you can [probably?] prove that this is the case by turning off
- LAST STACK, ARG, and CMD, putting 0 on the stack several times,
- clearing the stack, then typing MEM and DROP a few times: the
- first value you get for MEM is the same as the last value.
-
- furthermore, putting a medium-sized matrix on the stack ( { 12 3 },
- 303 bytes), doing MEM, dropping it, then repeating the first step
- above, gives these values:
-
- 8100 (matrix on stack)
- 8115.5 (clear stack)
- 8409
- 8411
- 8411
-
- at the second number, the matrix is still held in LAST STACK; after
- i type MEM, it is replaced with the result for MEM. [if this is all
- totally wrong, it's because i've only been up for an hour]
-
- >What is the SYSEVAL to force garbage collection. If that is tried,
- >when the problem occurs we can see if is the cure. Though I don't
- >think the 48 should have refused to perform an operation because of
- >low memory without attempting to get it back with garbage collection.
-
- as i understand it, the HP48 *does* do gc; this is the reason for
- occasional pauses in operations. i do know that this is the case
- with the 28s.
-
- but back to the original question: _where_ is 11k of my memory going?
-
- -cgw-
-