diff options
author | Peter Mitsis <peter.mitsis@windriver.com> | 2016-10-06 16:27:01 -0400 |
---|---|---|
committer | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-18 15:30:40 +0000 |
commit | 2a2b075826208cc0d54a98b2ddda905c3b9fac80 (patch) | |
tree | e842fad6deb4b9105060f3f3507e8e5fab1e62d3 /doc | |
parent | c61495b9bd826a04ee4affba18123f02880feb23 (diff) |
unified: Tweak K_MEMORY_POOL_DEFINE() macro
- Renames to K_MEM_POOL_DEFINE() for consistency
- Adds alignment parameter to align the pool buffer.
Jira: ZEP-926
Change-Id: I6cf0a1ce45c3a0fc5f0675047d8928659df1e75e
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/kernel_v2/memory/pools.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/kernel_v2/memory/pools.rst b/doc/kernel_v2/memory/pools.rst index 494aa3d9c..5a09eb947 100644 --- a/doc/kernel_v2/memory/pools.rst +++ b/doc/kernel_v2/memory/pools.rst @@ -121,7 +121,8 @@ A memory pool can only be defined and initialized at compile time by calling :c:macro:`K_MEM_POOL_DEFINE()`. The following code defines and initializes a memory pool that has 3 blocks -of 4096 bytes each, which can be partitioned into blocks as small as 64 bytes. +of 4096 bytes each, which can be partitioned into blocks as small as 64 bytes +and is aligned to a 4-byte boundary. (That is, the memory pool supports block sizes of 4096, 1024, 256, and 64 bytes.) Observe that the macro defines all of the memory pool data structures, @@ -129,7 +130,7 @@ as well as its buffer. .. code-block:: c - K_MEM_POOL_DEFINE(my_map, 64, 4096, 3); + K_MEM_POOL_DEFINE(my_map, 64, 4096, 3, 4); Allocating a Memory Block ========================= |