Xref: utzoo comp.sys.amiga:47258 comp.sys.amiga.tech:9259 Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!apple!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: Buggy Software Fix-It Kit Keywords: none Message-ID: <15486@well.UUCP> Date: 12 Jan 90 10:07:25 GMT References: <5289@blake.acs.washington.edu> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: Shyster & Shaft Legal Services Lines: 44 Quote: "You can't have everything. Where would you put it?" -- Steve Wright In article <5289@blake.acs.washington.edu> dlarson@blake.acs.washington.edu (Dale Larson) writes: >For example, WP has a lot of trouble dealing with low memory >situations, so programs for creating low and fragmented memory situations >would be helpful for them to have. [ ... ] Let *me* tell ya about low memory.... I've been pulling large quantities of hair off various part of my body trying to combat system failures to low memory. Despite whatever other flaws it has, I really have to hand it to Dan Silva; it's tough to crash DPaint with low memory. We know. We tried. Anyway, I've discovered that one rather important system function goes belly-up in a big way when memory gets short. It's AutoRequest(), and I formally reported the bug on BIX last night. "Okay," you say, "I won't call AutoRequest()." Ha. That's what you think. Remember DOS? It calls AutoRequest() to throw up those "Please insert volume copy 32 of Empty: in any drive" requesters. "Okay," I hear you say, "I'll set the Process.pr_WindowPtr to -1 and turn them off." Oh yeah? There are some DOS requesters you *can't* shut off. And what about other programs that may be running in the system that may indirectly call up a requester? "Okay," I hear you saying, "I'll do an AvailMem() before I do allocations or DOS calls and make sure there's enough memory left in the system for AutoRequest() to work." Uh huh. Apart from the fact that this will complicate your code beyond belief, you have no guarantee that other programs in the system will do the same thing, that is, leave a little bit for the OS. So even if you keep 100K free, someone else may allocate it out from under you, and you *still* end up looking at a flashing red box. The really irritating part of all this is that it looks like *your* program is at fault. I've been trying to think of various ways of defending myself against low memory, but I haven't been able to come up with a suitably elegant solution. If anyone has any suggestions, or can point to formal work on the subject, I'd greatly appreciate it. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape INET: well!ewhac@ucbvax.Berkeley.EDU \_ -_ Recumbent Bikes: UUCP: pacbell > !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Because you never know who might want to sit in your lap."