Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!att!cbnewsl!cbnewsk!ech From: ech@cbnewsk.att.com (ned.horvath) Newsgroups: comp.sys.mac.programmer Subject: NoteAlert Memory Req'ts (was: NoteAlert in growzone) Message-ID: <1991Mar12.154029.11242@cbnewsk.att.com> Date: 12 Mar 91 15:40:29 GMT References: <1991Mar8.222918.5713@ohs.uucp> Organization: AT&T Bell Laboratories Lines: 24 From article <1991Mar8.222918.5713@ohs.uucp>, by stay@ohs.uucp (Steve Taylor): > In a growzone function, there's 8K free and I call NoteAlert with > an alert that must be 200-300 bytes maximum. Somewhere in the call > to NoteAlert, my growzone function gets called with a request for > 10K. Why in the world would NoteAlert need 10K? I'm not loading > any segments or anything. When I re-wrote the growzone function > to use GetNewDialog with the same DITL but a dialog this time, it > worked fine. Does anyone have any ideas why NoteAlert would want > that much memory? Thanks. SWAG (Sophisticated Wild-Ass Guess): NoteAlert uses the "note" icon, which in turn uses the the note cicn if it's available. cicn-painting is very memory-intensive, it requires an 8K buffer plus the cicn resource itself. I don't know if the same memory requirements obtain if the cicn isn't present. There also was a bug in the NoteAlert (StopAlert, CautionAlert) traps in the Mac II -- that 8K was allocated on EVERY call, but was never freed. The bug was reported to and confirmed by Apple DTS, but I haven't gone looking for it recently, I just killed off those cicns in my system file and kept on going, so I don't know if it was ever patched. =Ned Horvath= ehorvath@attmail.com