Re: [LAD] memory allocation for the real time thread, opinions wanted

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Iain Duncan <iainduncanlists@...>, <linux-audio-dev@...>
Date: Sunday, February 26, 2012 - 11:29 am

Iain Duncan wrote:

Hi

>- I could pre-allocate a giant list of messages and pluck the data off

I'm writing from my phone, so for the sake of brevity, I will only talk about one option you might have missed:

Google for "A Study in Malloc: A Case of Excessive Minor Faults - USENIX" by Ezolt.

You can instruct your malloc implementation to operate on a previously allocated (and prefaulted) memory pool. free() will then never return the memory to the OS, but back to this memory pool.

This way, if you have a rough estimation for your overall memory requirements, you simply allocate it once in a non-real-time context and then use malloc/free at will.

HTH

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] memory allocation for the real time thread, opinio..., Adrian Knoth, (Sun Feb 26, 11:29 am)