{"action":"opened","issue":{"url":"https://api.github.com/repos/ARM-software/CMSIS_5/issues/313","repository_url":"https://api.github.com/repos/ARM-software/CMSIS_5","labels_url":"https://api.github.com/repos/ARM-software/CMSIS_5/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/ARM-software/CMSIS_5/issues/313/comments","events_url":"https://api.github.com/repos/ARM-software/CMSIS_5/issues/313/events","html_url":"https://github.com/ARM-software/CMSIS_5/issues/313","id":294006721,"number":313,"title":"Memory pool cannot be allocated for unaligned structs","user":{"login":"maldata","id":17076655,"avatar_url":"https://avatars3.githubusercontent.com/u/17076655?v=4","gravatar_id":"","url":"https://api.github.com/users/maldata","html_url":"https://github.com/maldata","followers_url":"https://api.github.com/users/maldata/followers","following_url":"https://api.github.com/users/maldata/following{/other_user}","gists_url":"https://api.github.com/users/maldata/gists{/gist_id}","starred_url":"https://api.github.com/users/maldata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maldata/subscriptions","organizations_url":"https://api.github.com/users/maldata/orgs","repos_url":"https://api.github.com/users/maldata/repos","events_url":"https://api.github.com/users/maldata/events{/privacy}","received_events_url":"https://api.github.com/users/maldata/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-02T20:02:43Z","updated_at":"2018-02-02T20:02:43Z","closed_at":null,"author_association":"NONE","body":"I created a Mail<T, size> object where the type T was a struct with size 258 bytes. The program fails to create the Mail<> object.\r\n\r\nWhen the memory pool is allocated in rtx_mempool.c, the size of the object is [rounded up to a multiple of 4](https://github.com/ARM-software/CMSIS_5/blob/bb78a8aa71384f2c7d909570d88d3cce3467ffe1/CMSIS/RTOS2/RTX/Source/rtx_mempool.c#L213). Shortly thereafter, [an error is reported](https://github.com/ARM-software/CMSIS_5/blob/bb78a8aa71384f2c7d909570d88d3cce3467ffe1/CMSIS/RTOS2/RTX/Source/rtx_mempool.c#L246) if the object's size was not a multiple of 4.\r\n\r\nI did not dig in any deeper to determine if there is a compelling reason for this limitation, but I wanted to submit an issue to see if this is the intentional behavior.\r\n\r\nThanks"}}
{"actor":{"display_login":"maldata"}}