Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!mit-eddie!mit-amt!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.ira.uka.de Newsgroups: comp.sys.mac.programmer Subject: FSWrite moving memory? (was Re: Think C 4.0 questions) Summary: No it won't! Message-ID: <1510@smurf.ira.uka.de> Date: 10 Feb 90 00:58:31 GMT References: <10682@bsu-cs.bsu.edu> <1968@cbnewsk.ATT.COM> <10111@hoptoad.uucp> <90039.151841CXT105@PSUVM.BITNET> Organization: University of Karlsruhe, FRG Lines: 27 In comp.sys.mac.programmer, article <90039.151841CXT105@PSUVM.BITNET>, CXT105@psuvm.psu.edu (Christopher Tate) writes: < In article <10111@hoptoad.uucp>, tim@hoptoad.uucp (Tim Maroney) says: < < >Why do you say FSWrite can move memory? It's not in the lists, so unless < >it's in an unlocked segment, I don't see how (or why!) it would move memory. < < According to Apple, the operating system has been patched from here to < hell and back again, and the lists are no longer valid. A much safer < way to go is to assume that any trap routine can move memory, and set < things up to deal with this possibility. < Not in this case. All file system calls are supposed to be callable from interrupt, and so they (as well as any patch sitting on them)_can't_ move memory. 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. Things aren't as easy as they seem to be -- at first I agreed with Tim, but I'm not sure anymore. Gotta test this sometime. -- Matthias Urlichs