I thought I fixed the docs, but it looks like that text is in kconfig?
The original mem_pool code had a hard requirement that the memory region be a power of four larger than the smallest allocation unit. That was relaxed a while back so that odd sizes would work, though at the cost of some fragmentation. And now the whole mem_pool implementation has been replaced as the default by a newer heap that has more conventional behavior and is more flexible with memory regions and more fragmentation resistant. You have to ask (via kconfig) to get the old backend now, the same API is pointing to wrappers.
So yes: pretty much any size will work fine for default code in the current tree. There are a few dragons still though, like the fact that CONFIG_HEAP_MEM_POOL_SIZE is actually padded significantly before it becomes a byte array in your image (because it specifies what in the old scheme was the block of "live" memory, and the old mem_pool would then allocate a completely separate array for metadata that wasn't accounted for).
On 6/9/2020 12:34 AM, Armand C. wrote: