rtems_region_create() returning error code

Sebastian Huber sebastian.huber at embedded-brains.de
Wed May 30 15:54:32 UTC 2018


----- Am 30. Mai 2018 um 16:20 schrieb Francesco Nuzzolo francesco.nuzzolo at spaceapplications.com:

> Thanks for the answer.
> 
> Do you know if there is a clean way to force allocation of an array to
> an 8-byte boundary in LEON?
> 
> Maybe defining the array as double, since sizeof(double) is 8 on LEON ?

Yes, this is one option. You could also use an alignment attribute.

> 
> Or should I stop using the region manager altogether?

This depends on your use case. The RTEMS heap implementation is a first-fit allocator. For some dynamic memory workloads this is not the best choice. The TLSF is worth to look at:

http://www.gii.upv.es/tlsf/
https://github.com/mattconte/tlsf



More information about the users mailing list