From: "DESVAGES Arnaud" Date: Wed, 6 Jun 2007 13:59:49 +0200 Message-ID: <000001c7a832$2f5b9230$0419dcc3@domain.hid> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C7A842.F2E46230" Subject: [Xenomai-help] real time task disapears... memory problem ? List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C7A842.F2E46230 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, =20 I'm currently working on feedback scheduling. I have a set of tasks : an = MPC controller, a feedback scheduler, and some disturbance tasks. =20 To do feedback scheduling, I need to measure the execution time quite accurately, and xenomai can not measure the execution time spend in the secondary mode. So I'm trying to stay in the primary mode. I had some = calloc and free in one function that made me leave primary mode (for the MPC = task). =20 I tried to replace this by a rt_heap, and doing rt_heap_alloc in place = of calloc, and I also tried to have static allocation. =20 =20 In both cases, my MPC task disappears when executing it! (nothing in /proc/xenomai/stat after the first try to execute it, but present during initialisation. and the other tasks are still here). =20 I'm working on it for a few days now, and I can't find out what is = wrong. I have tested to increase the maximum locked-in-memory size (in /etc/security/limits.conf). If I debug it with ddd, all is ok, array are well allocated... =20 The strangest thing is that if I put a printf (this make a switch to secondary mode) saying that heap allocation was successful, everything = works fine. So there is a function call that kills my task if I am in primary mode, and executes well if I am in secondary mode? =20 =20 Do you have any idea on where may be the mistake? Do you need some more information? =20 =20 My config: Linux 2.6.17-x320 preempt =20 =20 Thanks in advance, =20 =20 Arnaud DESVAGES =20 ------=_NextPart_000_0001_01C7A842.F2E46230 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

I’m currently working on feedback = scheduling. I have a set of tasks : an MPC controller, a feedback scheduler, and some disturbance tasks.

 

To do feedback scheduling, I need to measure = the execution time quite accurately, and xenomai can not measure the = execution time spend in the secondary mode. So I’m trying to stay in the primary = mode. I had some calloc and free in one function that made me leave primary mode = (for the MPC task).

 

I tried to replace this by a rt_heap, and = doing rt_heap_alloc in place of calloc, and I also tried to have static = allocation.

 

 

In both cases, my MPC task disappears when = executing it! (nothing in /proc/xenomai/stat after the first try to execute it, but = present during initialisation… and the other tasks are still = here).

 

I’m working on it for a few days now, = and I can’t find out what is wrong. I have tested to increase the maximum = locked-in-memory size (in /etc/security/limits.conf). If I debug it with ddd, all is ok, = array are well allocated...

 

The strangest thing is that if I put a printf = (this make a switch to secondary mode) saying that heap allocation was = successful, everything works fine. So there is a function call that kills my task if I am in = primary mode, and executes well if I am in secondary mode?

 

 

Do you have any idea on where may be the = mistake? Do you need some more information?

 

 

My config: Linux 2.6.17-x320 = preempt

 

 

Thanks in advance,

 

 

Arnaud DESVAGES

 

------=_NextPart_000_0001_01C7A842.F2E46230--