Re: IOProc limitations
Re: IOProc limitations
- Subject: Re: IOProc limitations
- From: Jeff Moore <email@hidden>
- Date: Fri, 01 Jun 2001 12:27:11 -0700
on 6/1/01 6:28 AM, James McCartney <email@hidden> wrote:
>
OK on MacOS 9 I have my own fast memory allocator.
>
My synth engine has to have dynamic memory allocation in the callback for
>
spawning new voices and allocating delay lines on the fly. It is not
>
possible to predict or preallocate these resources for various reasons.
>
>
On OS9 I do a HoldMemory() on this pool to guarantee that I will not page
>
fault. I understand that I cannot and should not access vm_wire on OSX.
>
The CoreAudio WWDC video I believe makes a statement to the effect that we
>
should take proper precautions not to page fault in the IOProc. But the
>
question is, how do we take those precautions?
The OS doesn't really provide you with many tools to wire down your memory.
It's an unfortunate situation , but on the whole, the OS X VM system seems
to do the right thing despite this. So in general, it hasn't come up on
machines with a healthy amount of physical RAM (and aren't running Classic).
Still, you always have the option of calling the Mach API directly (despite
our warnings to the contrary). Or barring that, writing a kext and doing it
in the kernel. I'm not recommending these practices (IMHO, you won't see
much if any speed improvements over the standard VM), but that's what an
Open Source OS is all about.
--
Jeff Moore
Core Audio
Apple