Re: [Xenomai] heap allocation working for some memory sizes but not others

2018-01-12 Thread Vincent Berenz
Hi, You are right, I did put too much trust on our legacy code. After increasing the heap once more in the kernel configuration and creating heap of size higher than the allocated heap, the problem seems to be solved. How much more memory should be created compared to the allocated size

Re: [Xenomai] heap allocation working for some memory sizes but not others

2018-01-11 Thread Greg Gallagher
Hi, So there could be a couple things going on. First, I'm not sure why from 2.6.4 to 3.0.x you are seeing the behavior change, but Xenomai 3 is fairly different from 2.6.x. It could be Xenomai 3 is more strict when it comes to heap allocation or the heap code is different in Xenomai 3. You

Re: [Xenomai] heap allocation working for some memory sizes but not others

2018-01-11 Thread Vincent Berenz
Hi Greg, Thanks a lot for your help. Indeed, reading the doc it makes sense to call rt_heap_bind after rt_heap_create. I updated my test code, but our legacy code have been working fine the other way around, though. I also changed the error management to consider 0 as success. But the

Re: [Xenomai] heap allocation working for some memory sizes but not others

2018-01-10 Thread Greg Gallagher
Hi, You may want to look at this test for help: https://git.xenomai.org/xenomai-3.git/tree/lib/alchemy/testsuite/heap-1.c I think you should have rt_heap_bind after your call to rt_heap_create, if you switch the timeout flag in rt_heap_bind to TM_INFINITE I think you should see your program

[Xenomai] heap allocation working for some memory sizes but not others

2018-01-10 Thread Vincent Berenz
Hi, We are currently moving from xenomai 2 to xenomai 3. I installed xenomai 3.0.5, and all seems to be working, with low latency. I am now trying to get our legacy code to work on xenomai 3 using the transition kit. Our program crashes on heap allocation (rt_heap_alloc function) with error