home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14489 < prev    next >
Encoding:
Text File  |  1992-08-25  |  1.6 KB  |  34 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. 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
  3. From: sdorner@qualcom.qualcomm.com (Steve Dorner)
  4. Subject: Re: dereferencing Handles( was Re: incrementation differences...)
  5. Message-ID: <1992Aug25.182750.13186@qualcomm.com>
  6. Sender: news@qualcomm.com
  7. Nntp-Posting-Host: qualcom.qualcomm.com
  8. Organization: Qualcomm, Inc., San Diego, CA
  9. References: <1992Aug24.221630.4730@Csli.Stanford.EDU> <1992Aug25.150911.19008@bnr.ca> <1992Aug25.161818.8069@hobbes.kzoo.edu>
  10. Date: Tue, 25 Aug 1992 18:27:50 GMT
  11. Lines: 21
  12.  
  13. k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
  14. >Yes, that last sentence is true.  But unless you call Toolbox routines
  15. >that move memory, the block will never move.  The above snippet doesn't
  16. >do that, so there's nothing to worry about.
  17.  
  18. Two caveats:
  19.  
  20. 1. Don't trust any list of toolbox routines that supposedly don't move
  21. memory.  People patch stuff, and s**t happens.  Code defensively. The
  22. only exception to this rule that *I* make is BlockMove; anybody who
  23. patches BlockMove and makes it move memory is going to have his thumbs
  24. broken.
  25.  
  26. 2. Be aware that function calls to an unloaded segment may move memory,
  27. and that some fairly innocuous operations can be implemented in
  28. libraries (division of longs on 68000's is one such, I think; certainly
  29. a lot of floating point operations fit here).  You can avoid this by making
  30. sure that important libraries are in locked segments.
  31. -- 
  32. Steve Dorner, Qualcomm, Inc.
  33. Yes, I'm still working on Eudora and it's still free.
  34.