Alchemy API queue size issue

Jan Kiszka jan.kiszka at siemens.com
Tue Mar 17 18:29:25 CET 2020


On 17.03.20 11:26, Merckx, Sebastiaan (Nokia - BE/Antwerp) via Xenomai 
wrote:
> Hello,
> 
> We noticed a bug in the alchemy API of xenomai library. The allocated memory for queues seemed too big.
> I assume that below is the fix (and we are using the patch internally).
> Let me know if you need more info or if this would not be correct.
> 
> Best Regards,
> Sebastiaan Merckx
> 
> diff --git a/lib/alchemy/queue.c b/lib/alchemy/queue.c
> --- a/lib/alchemy/queue.c
> +++ b/lib/alchemy/queue.c
> @@ -261,7 +261,7 @@ int rt_queue_create(RT_QUEUE *queue, con
>                                     poolsize + (poolsize * 5 / 100));
>          else
>                  ret = heapobj_init_array(&qcb->hobj, qcb->name,
> -                                        (poolsize / qlimit) *
> +                                        (poolsize / qlimit) +
>                                           sizeof(struct alchemy_queue_msg),
>                                           qlimit);
>          if (ret)
> 

That was fixed in 5e54f18b640e, available since v3.0.4. I suppose you 
are sitting on a seriously outdated branch. ;)

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list