• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Non-blocking memory allocation in real time threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Non-blocking memory allocation in real time threads
      • From: Jeff Moore <email@hidden>
  • Prev by Date: How to add timecode to CAF, such that Final Cut Pro 5 reads it
  • Next by Date: Re: How to add timecode to CAF, such that Final Cut Pro 5 reads it
  • Previous by thread: Re: How to add timecode to CAF, such that Final Cut Pro 5 reads it
  • Next by thread: Re: Non-blocking memory allocation in real time threads
  • Index(es):
    • Date
    • Thread