Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C 4.0 questions Message-ID: <10160@hoptoad.uucp> Date: 10 Feb 90 20:27:17 GMT References: <10682@bsu-cs.bsu.edu> <1968@cbnewsk.ATT.COM> <10111@hoptoad.uucp> <90039.151841CXT105@PSUVM.BITNET> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 31 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. In article <90039.151841CXT105@PSUVM.BITNET> CXT105@psuvm.psu.edu (Christopher Tate) writes: >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. FSWrite isn't even a trap, so it can't be patched. It's a front-end to the PBWrite trap. I can assure you that the traps which have an argument for asynchronous calling will always be callable at the interrupt level, and therefore they will never move memory. >Of course, this can be a real problem when you're trying to carefully >optimize things, or when you have to get down-and-dirty with the OS, but >it seems to me like a dandy way to ensure future compatibility.... It can also be a real problem in routine code writing. I would hate to think that I was supposed to start locking my handles before calling BlockMove or TickCount or PBWrite (synchronously). In real life, that's not going to happen; there are many traps which clearly will never move memory. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Our newest idol, the Superman, celebrating the death of godhead, may be younger than the hills; but he is as old as the shepherds." - Shaw, "On Diabolonian Ethics"