AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Roderik_Wildenburg
First of all, I'm not sure if that 8K of stack is enough on PPC with 2.4, on x86 over 2.6 it isn't. The native skin picks PTHREAD_STACK_MIN*4 for you by default. Is this too much? Unless dealing with dozens of *simple* threads, reducing this makes no sense to me. ?? Greping for

AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Roderik_Wildenburg
memset should work with Xenomai heaps, I suspect your problem is rather that the memory is not really allocated until you memset it, which fails when no memory is available. In this case, calling memset on memory allocated with malloc should segfault the same way when the system memory

Re: AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Wolfgang Grandegger
[EMAIL PROTECTED] wrote: memset should work with Xenomai heaps, I suspect your problem is rather that the memory is not really allocated until you memset it, which fails when no memory is available. In this case, calling memset on memory allocated with malloc should segfault the same way when

Re: AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Jan Kiszka
Wolfgang Grandegger wrote: [EMAIL PROTECTED] wrote: memset should work with Xenomai heaps, I suspect your problem is rather that the memory is not really allocated until you memset it, which fails when no memory is available. In this case, calling memset on memory allocated with malloc should

Re: AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Wolfgang Grandegger
Jan Kiszka wrote: Wolfgang Grandegger wrote: [EMAIL PROTECTED] wrote: memset should work with Xenomai heaps, I suspect your problem is rather that the memory is not really allocated until you memset it, which fails when no memory is available. In this case, calling memset on memory allocated

AW: AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Roderik_Wildenburg
The are some long delays (approx. 40 secs) around __alloc_pages. Finally it crashes in memset. With the attached xenomai patch, which touches the reserved page once, memset works fine. Let's wait what Philippe says. I remember that the touch was needed for RTAI shared memory as

Re: AW: AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Gilles Chanteperdrix
[EMAIL PROTECTED] wrote: The are some long delays (approx. 40 secs) around __alloc_pages. Finally it crashes in memset. With the attached xenomai patch, which touches the reserved page once, memset works fine. Let's wait what Philippe says. I remember that the touch was

AW: AW: AW: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-11 Thread Roderik_Wildenburg
Maybe the task is in fact killed by the OOM killer ? It would prove that this function is working correctly, since the killed task is the one that allocates all the memory. Is there no trace in the logs ? Could not find a hint in the /var/log/messages from OOM killer. Nothing that says

[Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-10 Thread Roderik_Wildenburg
Xenomai Version : 2.2-rc2 Skin : native Kernel : 2.4.25 Arch.: PPC I try to allocate as much memory as possible with the functions : rt_heap_create and rt_heap_alloc. (see also Xenomai heap services in this mailing list; see source attached) When I try to use the allocated memory with memset,

Re: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-10 Thread Gilles Chanteperdrix
[EMAIL PROTECTED] wrote: Xenomai Version : 2.2-rc2 Skin : native Kernel : 2.4.25 Arch.: PPC I try to allocate as much memory as possible with the functions : rt_heap_create and rt_heap_alloc. (see also Xenomai heap services in this mailing list; see source attached) When

Re: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-10 Thread Jan Kiszka
[EMAIL PROTECTED] wrote: Xenomai Version : 2.2-rc2 Skin : native Kernel : 2.4.25 Arch.: PPC I try to allocate as much memory as possible with the functions : rt_heap_create and rt_heap_alloc. (see also Xenomai heap services in this mailing list; see source attached) When I try to use

Re: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-10 Thread Jan Kiszka
Gilles Chanteperdrix wrote: [EMAIL PROTECTED] wrote: Xenomai Version : 2.2-rc2 Skin : native Kernel : 2.4.25 Arch.: PPC I try to allocate as much memory as possible with the functions : rt_heap_create and rt_heap_alloc. (see also Xenomai heap services in this mailing

Re: [Xenomai-help] memset of heap crashes Xenomai-Task

2006-07-10 Thread Gilles Chanteperdrix
Jan Kiszka wrote: Gilles Chanteperdrix wrote: [EMAIL PROTECTED] wrote: Xenomai Version : 2.2-rc2 Skin : native Kernel : 2.4.25 Arch.: PPC I try to allocate as much memory as possible with the functions : rt_heap_create and rt_heap_alloc. (see also