Path: utzoo!attcan!uunet!jarthur!usc!julius.cs.uiuc.edu!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: "Out of memory" Message-ID: <10287@goofy.Apple.COM> Date: 18 Sep 90 21:14:40 GMT References: <120394@linus.mitre.org> Organization: Apple Computer Inc., Cupertino, CA Lines: 25 In article <120394@linus.mitre.org> laf@mbunix.mitre.org (Lee Fyock) writes: >What causes the multifinder message "The application XXX >unexpectedly quit (out of memory)"? I would think that a >memory request (NewPtr or NewHandle) would cause it, but >shouldn't they just return null, with the appropriate MemErr? This should only happen if somewhere within the OS or ToolBox there's a request for memory (which it can't get), and it can't back out gracefully. I can't remember if this could happen when a new segment needs to be loaded (or if that would return a segment loader error), but that's the kind of case where it could happen. In that case, one routine tries to call another routine in another segment, the segment can't be loaded, and the app can't go anywhere from there so it dies. If the app itself calls NewPtr or NewHandle, it would check for a nil pointer or handle, or MemErr, so it wouldn't suffer this kind of death. steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ whoami? Steve Christensen snail: Apple Computer, 20525 Mariani Ave, MS-81CS, Cupertino, CA 95014 Internet: stevec@goofy.apple.com AppleLink: stevec CompuServe: 76174,1712