Module: xenomai-3 Branch: master Commit: b4a4fdba401f004d55f49ba6ed89755e86da208f URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b4a4fdba401f004d55f49ba6ed89755e86da208f
Author: Philippe Gerum <r...@xenomai.org> Date: Wed Oct 14 14:45:30 2015 +0200 alchemy/heap: allow zero size for SBA binding --- lib/alchemy/heap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/alchemy/heap.c b/lib/alchemy/heap.c index 20531e3..146bfa1 100644 --- a/lib/alchemy/heap.c +++ b/lib/alchemy/heap.c @@ -442,7 +442,9 @@ int rt_heap_alloc_timed(RT_HEAP *heap, p = __mptr(hcb->sba); if (p) goto done; - if (size > 0 && size != hcb->size) { + if (size == 0) + size = heapobj_size(&hcb->hobj); + else if (size != hcb->size) { ret = -EINVAL; goto done; } _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git