Page  188 ï~~EFFICIENT DYNAMIC RESOURCE MANA DSPS, AS IMPLEMENTED IN THE David A Jaffe NeXT, Inc. 900 Chesapeake Drive Redwood City, CA 940( (415) 366 0900 (415) 780 3715 Fax David Jaffe@ next.corr ABSTRACT: The NeXT Music Kit DSP re maximizes both flexibility and efficiency. The making nearly performance. every part of the system dynami Furthermore, an application can "e abstraction, supporting such diverse uses I F

Page  189 ï~~Level 1 is most useful when debugging a new unit generator allocation done dynamically while playing music, mana Furthermore, the Orchestra class itself manages any number o performance allocation on applications use level the most automatic I demand-driven basis, based incomin Synthlnstruments are beyond the scope of this paper, which fc TECHNIQUES THAT MAKE EFFICIEN" Resources are shared whenever possible. When a resour published as a shared resource. In this case, a reference coun Resources are reused whenever possible. When a UnitG actually freed, but merely slated for possible garbage collec shared resource goes to zero, it is retained and slated for possi 40 Aft- a t t -UT- a

Page  190 ï~~1. The Orchestra class passes control to the first Or 2. Check for a deallocated UnitGenerator ("UG") c 3. Look for a UG of the requested type in a deallo and return the UG. 4. Beginning at the top of the UG stack, free all idl Continue until a non-idle UG or U( 5. If there is sufficient DSP memory and compute type, create and return the new UG. 6. Compact the UnitGenerator stack and repeat ste 7. Repeat the algorithm with the next Orchestra in SynthData allocation SynthData allocation is similar to UnitGenerator allocation w immediately freed to keep the data heap as compact as pos allocate the new SynthData, any shared SynthData with a refc