Non-blocking memory allocation in real time threads
Non-blocking memory allocation in real time threads
- Subject: Non-blocking memory allocation in real time threads
- From: Marcus Zetterquist <email@hidden>
- Date: Mon, 08 Aug 2005 13:06:46 +0200
Hi!
I've been trying to search the archive for this with no result:
So far our Core Audio and Core MIDI real time code has been designed never
to allocate memory from the heap.
Now we would like to use C++ new, std::vector , std::string and so forth in
the Core Audio/MIDI callbacks. These calls will be made rarely though.
Is there a good way to make sure these calls never block? We need to avoid
crackles in the audio caused when _another_ thread has caused this heap's
mutex to be locked.
It would be nice, for example, to be able to create a special heap that only
the Core Audio callback allocates memory from = this heap will never have
its mutex locked by another thread. I realize I would have to make my own
operator new or use STL allocators or something too.
Any pointers?
/Marcus
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden