kdmoen@watcgl.UUCP (11/11/87)
Thanks to all of the wonderful people who have written to tell me that unloaded code segments can move around in memory while a Mac application is running. I would like to clarify one point that might have been lost in the flurry of followup postings. In his original article, David Phillip Oster (oster@dewey.soe.berkeley.edu.UUCP) writes: >The authors of the compiler seem to be unaware that on a Macintosh >executable code can move while the program is running. Unlike all Macintosh >compilers, they generate position _dependent_ code, and have a funky >loader scheme to resolve non-relocatable references at program load >time. Eventually, the code moves, and all that position dependent code >points at never-neverland. > >Conclusion: >Don't use sumacc C. Because of its authors' poor understanding of the >Macintosh execution time environment, the sumacc C compiler generates >incorrect code. This is only true if you are writing desk accessories. If you are writing an *application*, then the sumacc compiler+rmaker will create a single segment, which can be arbitrarily large, and which does not move around during execution. In other words, it is perfectly safe to use Sumacc for writing applications. -- Doug Moen University of Waterloo Computer Graphics Lab UUCP: {ihnp4,watmath}!watcgl!kdmoen INTERNET: kdmoen@cgl.waterloo.edu