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 ? Roderik > -----Ursprüngliche Nachricht----- > Von: Gilles Chanteperdrix [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 5. September 2006 17:18 > An: Wildenburg, Roderik RAEK3 MRA > Cc: [email protected] > Betreff: Re: [Xenomai-help] resubmission : memset of heap > crashes Xenomai-Task > > [EMAIL PROTECTED] wrote: > > Some times ago (2006.07.06) I had the problem described below. > > As far as I can see, there is no solution for this till now. > > I think, it is worth a second go, as I believe, a > industrial strength application can´t accept this behavior. > > Therefore I would like to ask the Xenomai-PPC gurus (as > far as I can see, it could only be reproduced on PPC (not > Qemu)) again, to judge, whether this is a serios problem or > just something I have to live with. > > > > Thank you in advance > > Roderik > > > > > > 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 source attached) > > > > When I try to use the allocated memory with memset, the > Xenomai-task crashes with a "Segmentation fault". > > You are doing: > > RT_HEAP bigheap[MAXHEAPBLOCKS]; > > > for(i=0;i<MAXHEAPBLOCKS;i++) > { > /* some treatment */ > } > > /* access bigheap[i] */ > > After the for loop, i is MAXHEAPBLOCKS, so, you are accessing > the bigheap array beyond its end, probably overriding the > bigbuf array. > > -- > > > Gilles Chanteperdrix. > _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
