Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!tektronix!sequent!mntgfx!tomc From: tomc@mntgfx.mentor.com (Tom Carstensen) Newsgroups: comp.sys.mac.programmer Subject: Memory management - preflighting & segmentation Keywords: memory management preflighting segmentations Message-ID: <1989Feb6.142037.2211@mntgfx.mentor.com> Date: 6 Feb 89 22:20:35 GMT Organization: Mentor Graphics Corporation, Beaverton Oregon Lines: 22 I'm trying to get my memory management staightened out. I have re-segmented my program, made sure that every call to a memory allocation routine checks for an error, put in a Grow proc and have allocatyed a small buffer when all attempts to allocate memory fail. Everything is working great, the only problems I have are system errors when a code segment that is needed can't be loaded into memory. I read about a scheme you had for MacApp, where you determine the maximum code set, and make sure there is at least this much memory minus the memory currently used by loaded code segments. Question: Do you add up the total memory used by loaded code segments continuously, - I guess I'm not quite sure how this scheme works. I would appreciate it if you could send be a little more info on this scheme. Thanks Tom Carstensen