home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!network.ucsd.edu!qualcom.qualcomm.com!qualcom.qualcomm.com!sdorner
- From: sdorner@qualcom.qualcomm.com (Steve Dorner)
- Subject: Re: dereferencing Handles( was Re: incrementation differences...)
- Message-ID: <1992Aug25.182750.13186@qualcomm.com>
- Sender: news@qualcomm.com
- Nntp-Posting-Host: qualcom.qualcomm.com
- Organization: Qualcomm, Inc., San Diego, CA
- References: <1992Aug24.221630.4730@Csli.Stanford.EDU> <1992Aug25.150911.19008@bnr.ca> <1992Aug25.161818.8069@hobbes.kzoo.edu>
- Date: Tue, 25 Aug 1992 18:27:50 GMT
- Lines: 21
-
- k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
- >Yes, that last sentence is true. But unless you call Toolbox routines
- >that move memory, the block will never move. The above snippet doesn't
- >do that, so there's nothing to worry about.
-
- Two caveats:
-
- 1. Don't trust any list of toolbox routines that supposedly don't move
- memory. People patch stuff, and s**t happens. Code defensively. The
- only exception to this rule that *I* make is BlockMove; anybody who
- patches BlockMove and makes it move memory is going to have his thumbs
- broken.
-
- 2. Be aware that function calls to an unloaded segment may move memory,
- and that some fairly innocuous operations can be implemented in
- libraries (division of longs on 68000's is one such, I think; certainly
- a lot of floating point operations fit here). You can avoid this by making
- sure that important libraries are in locked segments.
- --
- Steve Dorner, Qualcomm, Inc.
- Yes, I'm still working on Eudora and it's still free.
-