[comp.sys.apple] Memory release problem, IIGS

kenv@pro-newfrontier.UUCP (Ken Vatz) (10/24/88)

This is for Keith Rollins in particular, and anyone else who wants to comment:
Wordbench, which is a P8 program, acts peculiarly when launched from P16 or
GS/OS.  If you warm boot into Wordbench using P8 (1.4 and above), WB finds
available memory in RAM (up to several hundred K), then releases it on
quitting.  If you boot into GS/OS first (or P16), then go to P8 and the
Wordbench system, it finds the memory, but on quitting usually does not
release
it.  It also acts this way if you boot into P8 but add CDA's via P8CDA. 
Interestingly, if WB has not released the memory, and you then go into
Appleworks 2.0 or a P16 program like ECP16, and then quit Appleworks or the
P16
program, AW will have released the memory completely if you booted into P16
initially, incompletely if you booted into GS/OS initially.
I talked to one of Wordbench's developers about this.  He said that the
program
deals with the Memory Manager following Apple's guidelines, and he doesn't
understand why P16, GS/OS or CDA's should interfere with memory clearance.  He
said it is even stranger that Appleworks should clear the memory.
Does anyone have an idea about this?
Is there a utility around that can be used to clear IIGS RAM memory when a
program fails to release it?
  UUCP: crash!pro-newfrontier!Ken Vatz
  ARPA: crash!pro-newfrontier!Ken Vatz@nosc.mil
  INET: Ken Vatz@pro-newfrontier.cts.com
  Proline: Ken Vatz@pro-newfrontier

keith@Apple.COM (Keith Rollin) (10/26/88)

In article <8810250759.AA25134@crash.cts.com> pnet01!pro-sol!pro-newfrontier!kenv@nosc.mil writes:
>This is for Keith Rollins in particular, and anyone else who wants to comment:
>Wordbench, which is a P8 program, acts peculiarly when launched from P16 or
>GS/OS.  If you warm boot into Wordbench using P8 (1.4 and above), WB finds
>available memory in RAM (up to several hundred K), then releases it on
>quitting.  If you boot into GS/OS first (or P16), then go to P8 and the
>Wordbench system, it finds the memory, but on quitting usually does not
>release it.  

Calling MMShutDown() at the end of your program WILL release the memory for you,
as long as you are passing the Memory Manager the right ID.

Wait a sec!  This is a ProDOS 8 program? Doing Memory Management under ProDOS
8 is a little tricky. You'd have to get an ID from the ID manager in the Misc
Tools, and use that for your NewHandle calls. You can't use the one returned
by MMStartup, as that is the ProDOS 8 ID number ($3000 I think). However,
MMShutdown should still release all of that memory.

How are you checking to see if the memory is still around? Are you sure that it
is still allocated? Or are the handles indeed purgeable but not yet purged. If
the latter, then everything is OK. The memory will be reclaimed when something
else needs it.


Keith Rollin                               UUCP:      amdahl\
Developer Technical Support                      pyramid!sun !apple!keith
Apple Computer                                        decwrl/
                                         BITNET: keith%apple.com@relay.cs.net
"You can do what you want to me, but leave my computer alone!"