newbie heap usage problem
Quoted 11 lines · S. ancelot
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 faultsHere is my program
#include <
sys/mman.h>
#include <xenomai/native/heap.h>
#include <stdio.h>
- RT_HEAP *m;
+ RT_HEAP m;
Quoted 5 lines
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);
Quoted 12 lines
return 0;
}
Best Regards
S@_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Signature · 1 line
Philippe.
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@