array declaration of double values causes seg faults
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
Quoted 7 lines · Axel Beierlein
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?
Quoted 8 lines
I use Xeno 2.3.1 with an 2.4.25 Kernel
Axel
_______________________________________________
Xenomai-help mailing list
[email protected]
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
Quoted 11 lines · Axel Beierlein
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.
Signature · 1 line
Gilles Chanteperdrix