[EMAIL PROTECTED] wrote:
> Dear Gilles,
>
> I admit, the mechanism for allocating all memory of the target is not very
> sophisticated. The idea was, that MAXHEAPBLOCKS*MEMORYCHUNKSIZE is much much
> more, than memory available (at least with my target (128MB) this is true).
> I should have mentioned this in the source code, sorry. If your target has
> more then (MAXHEAPBLOCKS*MEMORYCHUNKSIZE=320MB(approcimate)) memory, you
> should increase MAXHEAPBLOCKS.
>
> If this condition is fulfiled, I think, there should be no illegal memory
> access. Do you agree ?
I disagree. Please apply the attached patch to heap.c. If I am right, it
should make the program abort with the message:
"Stopping here, in order to avoid later SEGV."
If you are right, the program should segfault.
--
Gilles Chanteperdrix.
--- heap.c~ 2006-09-06 14:27:31.000000000 +0200
+++ heap.c 2006-09-06 14:25:45.000000000 +0200
@@ -101,7 +101,11 @@ void display(void *cookie)
{
memsize+=addsize;
if(!(ret=rt_heap_create(&bigheap[i],nbuf,memsize,H_PRIO|H_MAPPABLE)))
+ {
+ printf("Stopping here, in order to avoid later SEGV.\n");
+ exit(EXIT_FAILURE);
rt_heap_delete(&bigheap[i]);
+ }
}while(ret==0);
memsize>>=1;
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help