All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] array declaration of double values causes seg faults
@ 2007-10-19 10:09 Axel Beierlein
  2007-10-19 10:18 ` CHABAL David
  2007-10-19 10:20 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Beierlein @ 2007-10-19 10:09 UTC (permalink / raw)
  To: Xenomai-help@domain.hid

Hello,

i try to use a simple function inside of an RT-Task in Userspace. Inside  
of this function i only declare three array´s of doubles with 5000 values  
in it.
When i run the program a seg fault was shown. When i replace the array  
declaration with an printf the seg fault is away.

Do i have memory limitations inside of an RT-Task?

I use Xeno 2.3.1 with an 2.4.25 Kernel

Axel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] array declaration of double values causes seg faults
  2007-10-19 10:09 [Xenomai-help] array declaration of double values causes seg faults Axel Beierlein
@ 2007-10-19 10:18 ` CHABAL David
  2007-10-19 10:20 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 3+ messages in thread
From: CHABAL David @ 2007-10-19 10:18 UTC (permalink / raw)
  To: Axel Beierlein; +Cc: Xenomai-help@domain.hid

Axel Beierlein a écrit :
> Hello,
> 
> i try to use a simple function inside of an RT-Task in Userspace. Inside  
> of this function i only declare three array´s of doubles with 5000 values  
> in it.
> When i run the program a seg fault was shown. When i replace the array  
> declaration with an printf the seg fault is away.
> 
> Do i have memory limitations inside of an RT-Task?
> 
> I use Xeno 2.3.1 with an 2.4.25 Kernel
> 
> Axel
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help


Hello,

I don't know what is your arch but I think it's a stack overflow problem.

Try to declare your array as static or increase the stack size value (may be 4Ko on i386?)

David


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] array declaration of double values causes seg faults
  2007-10-19 10:09 [Xenomai-help] array declaration of double values causes seg faults Axel Beierlein
  2007-10-19 10:18 ` CHABAL David
@ 2007-10-19 10:20 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 3+ messages in thread
From: Gilles Chanteperdrix @ 2007-10-19 10:20 UTC (permalink / raw)
  To: Axel Beierlein; +Cc: Xenomai-help@domain.hid

On 10/19/07, Axel Beierlein <belatronix@domain.hid> wrote:
> Hello,
>
> i try to use a simple function inside of an RT-Task in Userspace. Inside
> of this function i only declare three array´s of doubles with 5000 values
> in it.
> When i run the program a seg fault was shown. When i replace the array
> declaration with an printf the seg fault is away.
>
> Do i have memory limitations inside of an RT-Task?
>
> I use Xeno 2.3.1 with an 2.4.25 Kernel

When declaring variables in a function, memory is reserved on the
stack. So, if you get a segfault, you probably exhausted the RT-task
stack.

-- 
                                               Gilles Chanteperdrix


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-19 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-19 10:09 [Xenomai-help] array declaration of double values causes seg faults Axel Beierlein
2007-10-19 10:18 ` CHABAL David
2007-10-19 10:20 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.