* Re: [Xenomai-help] newbie heap usage problem
2006-01-11 13:44 [Xenomai-help] newbie heap usage problem S. ancelot
@ 2006-01-11 13:07 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2006-01-11 13:07 UTC (permalink / raw)
To: S. ancelot; +Cc: xenomai
S. ancelot wrote:
> Hi,
> I tried to make a programming sample using heap .
> The heap seems to be created regarding registry in proc, but then the
> program seg faults
>
>
> Here is my program
>
> #include <sys/mman.h>
> #include <xenomai/native/heap.h>
> #include <stdio.h>
>
- RT_HEAP *m;
+ RT_HEAP m;
> int x;
>
> int main()
> {
> mlockall(MCL_CURRENT|MCL_FUTURE);
- x = rt_heap_create(m,"toto",100,H_SHARED);
- rt_heap_delete(m);
+ x = rt_heap_create(&m,"toto",100,H_SHARED);
+ rt_heap_delete(&m);
> return 0;
>
> }
>
> Best Regards
> S@
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Xenomai-help] newbie heap usage problem
@ 2006-01-11 13:44 S. ancelot
2006-01-11 13:07 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: S. ancelot @ 2006-01-11 13:44 UTC (permalink / raw)
To: xenomai
Hi,
I tried to make a programming sample using heap .
The heap seems to be created regarding registry in proc, but then the
program seg faults
Here is my program
#include <sys/mman.h>
#include <xenomai/native/heap.h>
#include <stdio.h>
RT_HEAP *m;
int x;
int main()
{
mlockall(MCL_CURRENT|MCL_FUTURE);
x = rt_heap_create(m,"toto",100,H_SHARED);
rt_heap_delete(m);
return 0;
}
Best Regards
S@
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-11 13:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-11 13:44 [Xenomai-help] newbie heap usage problem S. ancelot
2006-01-11 13:07 ` Philippe Gerum
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.