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

2012-02-29 Thread David Robillard
On Tue, 2012-02-28 at 16:34 -0500, Paul Coccoli wrote: > On Mon, Feb 27, 2012 at 8:43 PM, James Morris wrote: > > On Mon, 27 Feb 2012 20:01:18 -0500 > > Paul Coccoli wrote: > [Mass snippage] > >> Why not just use 2 ringbuffers: one to send pointers to the RT thread, > >> and a second to send them

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

2012-02-29 Thread Iain Duncan
Thanks for all the comments everyone! iain On Tue, Feb 28, 2012 at 1:34 PM, Paul Coccoli wrote: > On Mon, Feb 27, 2012 at 8:43 PM, James Morris wrote: > > On Mon, 27 Feb 2012 20:01:18 -0500 > > Paul Coccoli wrote: > [Mass snippage] > >> Why not just use 2 ringbuffers: one to send pointers to t

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

2012-02-28 Thread Paul Coccoli
On Mon, Feb 27, 2012 at 8:43 PM, James Morris wrote: > On Mon, 27 Feb 2012 20:01:18 -0500 > Paul Coccoli wrote: [Mass snippage] >> Why not just use 2 ringbuffers: one to send pointers to the RT thread, >> and a second to send them back to the low prio thread (so it can free >> them).  You probabl

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

2012-02-28 Thread Harry van Haaren
On Tue, Feb 28, 2012 at 1:01 AM, Paul Coccoli wrote: > Why not just use 2 ringbuffers: one to send pointers to the RT thread, > and a second to send them back to the low prio thread (so it can free > them) > The entire Luppp engine is based around that principle. The only downside is that one can

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

2012-02-27 Thread David Robillard
On Mon, 2012-02-27 at 20:01 -0500, Paul Coccoli wrote: > On Mon, Feb 27, 2012 at 8:04 AM, Fons Adriaensen wrote: > > On Mon, Feb 27, 2012 at 09:59:19AM +0100, Nick Copeland wrote: > > > >> Both of these methods are affectively the same, what you are trying to do > >> is provide > >> a method that

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

2012-02-27 Thread James Morris
On Mon, 27 Feb 2012 20:01:18 -0500 Paul Coccoli wrote: > On Mon, Feb 27, 2012 at 8:04 AM, Fons Adriaensen > wrote: > > On Mon, Feb 27, 2012 at 09:59:19AM +0100, Nick Copeland wrote: > > > >> Both of these methods are affectively the same, what you are > >> trying to do is provide a method that t

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

2012-02-27 Thread Paul Coccoli
On Mon, Feb 27, 2012 at 8:04 AM, Fons Adriaensen wrote: > On Mon, Feb 27, 2012 at 09:59:19AM +0100, Nick Copeland wrote: > >> Both of these methods are affectively the same, what you are trying to do is >> provide >> a method that the low prio thread is responsible for both malloc and free. > > T

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

2012-02-27 Thread Fons Adriaensen
On Mon, Feb 27, 2012 at 09:59:19AM +0100, Nick Copeland wrote: > Both of these methods are affectively the same, what you are trying to do is > provide > a method that the low prio thread is responsible for both malloc and free. That's a nice method, it effectively uses the LFQ to 'send back' a

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

2012-02-27 Thread Emanuel Rumpf
Hi It's good to work with pointers, as Nick pointed out. If that is not possilbe for any reason, an options is to use a (pre-allocated) memory pool. You might want to examine this library : TLSF http://www.gii.upv.es/tlsf/ " I could allocate in the non-realtime thread and then pass memory over

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

2012-02-27 Thread Nick Copeland
: Mon, 27 Feb 2012 09:38:34 +0100 > From: t...@quitte.de > To: a...@drcomp.erfurt.thur.de > CC: linux-audio-dev@lists.linuxaudio.org > Subject: Re: [LAD] memory allocation for the real time thread, > opinions wanted > > [Adrian Knoth] > > >Iain Duncan wrote:

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

2012-02-27 Thread Tim Goetze
[Adrian Knoth] >Iain Duncan wrote: > >Hi > >>- I could pre-allocate a giant list of messages and pluck the data off >>that >>list when I need to make a new one >>- I could pre-allocate a block of memory and allocate off that > >I'm writing from my phone, so for the sake of brevity, I will only >

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

2012-02-26 Thread Adrian Knoth
Iain Duncan wrote: Hi >- I could pre-allocate a giant list of messages and pluck the data off >that >list when I need to make a new one >- I could pre-allocate a block of memory and allocate off that I'm writing from my phone, so for the sake of brevity, I will only talk about one option you m

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

2012-02-25 Thread Iain Duncan
On Sat, Feb 25, 2012 at 2:25 PM, Iain Duncan wrote: > Hi everyone, hoping to get opinions from gurus on here, who have been > *incredibly* helpful in getting my project to where its at. A million thank > yous! > > Ok, the situation so far, which is working well: > - the app uses a generalized 'mes

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

2012-02-25 Thread Iain Duncan
Hi everyone, hoping to get opinions from gurus on here, who have been *incredibly* helpful in getting my project to where its at. A million thank yous! Ok, the situation so far, which is working well: - the app uses a generalized 'message' structure, all the different forms of messages fit into th