[comp.sys.mac] That rascally Macsbug

ephraim@wang.UUCP (590) (01/12/87)

A long time ago, when I was developing a ramdisk to work with expanded
memory (>512K), I discovered that Macsbug had some nasty habits.  Two
years and several Macsbugs later, it's not much better...

Apple urges developers to go easy on system heap space.  Tech notes
2 and 14 urge you to take space at the top of memory if you need it
permanently, then adjust BufPtr.  What happens if you try to follow
these guidelines with your SCSI driver?  Macsbug kills you.

Macsbug likes to locate itself in the same place all the time.  To 
keep other things from stepping on it, it sets BufPtr to reflect the
space it uses.  Too bad it doesn't *check* BufPtr before installing
itself!  

So, if you want your SCSI driver out of the system heap, you have to 
leave it in the system heap at boot time, wait for Macsbug to do its
dirty work, then move the driver (and your drive queue elements?  and
your driver variables?) to high memory at INIT time.