Path: utzoo!attcan!uunet!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.ira.uka.de Newsgroups: comp.sys.mac.programmer Subject: Re: FSWrite moving memory? (was Re: Think C 4.0 questions) Message-ID: <1528@smurf.ira.uka.de> Date: 13 Feb 90 20:05:26 GMT References: <10682@bsu-cs.bsu.edu> <1968@cbnewsk.ATT.COM> <10111@hoptoad.uucp> <90039.151841CXT105@PSUVM.BITNET> <1510@smurf.ira.uka.de> <34240@ucbvax.BERKELEY.EDU> <10193@hoptoad.uucp> Organization: University of Karlsruhe, FRG Lines: 35 In comp.sys.mac.programmer, article <10193@hoptoad.uucp>, tim@hoptoad.UUCP (Tim Maroney) writes: < In article <34240@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP < (David Phillip Oster) writes: < >Matthias Urlichs writes: < >>Unfortunately, I wonder if they still could possibly move memory in the < >>synchronous case, which may not be called from interrupt. < >>If the disk to be written to isn't online, the Mac will display its nice < >>"Please insert the disk" alert. It would be interesting to know if this can < >>make any memory manager calls, and if so, in what heap. < > < >Since these are just resources, they certainly will move memeory unless < >they've already been read in and locked in. There is a system call: < >CanAlert(), to preread such things. Does your program call it? < < This is another definite miss. It's actually a system error alert, as < stated in IM II-80 and IV-92. System error alerts are described in the < system error alert table, a non-relocatable, pre-allocated, and < pre-initialized structure. System error alerts don't move any memory < under any circumstances, and they don't use resources. This is what the docs say. I just wonder why, in the synchronous case, I get a "Please insert the disk" error, while in the async case (and even when calling PBxxx(PB,TRUE) from my main event loop or something) I do in fact get PB.ioResult = volOfflinErr. Something must be going on here. It can't be interrupts, since the System could simply stick the request to bring up the alert into the deferred task manager queue or something. Anyone in the know ? Could it possibly be because that system error alert is invalidating whatever was behind it, which definitely would move memory? (Such invalidation could of course be deferred until the next GetNextEvent, but this is not what's happening.) -- Matthias Urlichs