[comp.sys.mac.programmer] low memory globals and multitasking

ech@cbnewsk.ATT.COM (ned.horvath) (02/07/90)

From article <918@ra.cs.Virginia.EDU>, by des7f@ra.cs.Virginia.EDU (David Sappington):
> 
> Recently there has been some discussion on the net regarding low memory
> globals.  Are ALL of them expected to be unavailable eventually?
> Specifically, I'm interested in Ticks which is VERY useful in tight,
> multifinder-friendly loops.  Consider the following pseudo-code:

No, I'd expect toolbox-y things to stay around (e.g. the DA font).  Ticks
is already history under A/UX, although TickCount() does the right thing.

I use the trap where there is one.  If you can't take the performance hit,
do the end run and be prepared to rev your program someday.  Leave tracks
so your heirs will be able to find the "new" bug.

The bigger problem is with calls to read/modify low memory globals that
are [Not in ROM].  Some of these (like SetDAFont) are pretty harmless
and probably don't need to be "real" traps.  Others need real traps.

Clearly, here, Apple has to provide the traps,
and the sooner the better; when a low-memory global goes, it takes time
to rev the MPW headers, and time for the compiler companies to rev their
libraries, and time for the developers to relink with the new libraries,
and time for the distributors to get the goods out.  The end user at the
end of that food chain has to choose between the insanely great new
system software and the application they need to make a living...

=Ned Horvath=

barry@reed.UUCP (Barry Smith) (02/09/90)

It was my understanding that Apple reintroduced the Ticks low-memory
global in A/UX 1.1, presumably for exactly this purpose.  Is this not
the case?

Thanks for the VBL/global idea; does this work under A/UX?

Barry Smith, Blue Sky Research