Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop b077f8a9c -> 48ef7aea7


util - Fix up mem function comments.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/48ef7aea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/48ef7aea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/48ef7aea

Branch: refs/heads/develop
Commit: 48ef7aea751cdccb317b652e7dae676d55150b2f
Parents: b077f8a
Author: Christopher Collins <[email protected]>
Authored: Tue Aug 9 11:16:17 2016 -0700
Committer: Christopher Collins <[email protected]>
Committed: Tue Aug 9 11:16:17 2016 -0700

----------------------------------------------------------------------
 libs/util/src/mem.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/48ef7aea/libs/util/src/mem.c
----------------------------------------------------------------------
diff --git a/libs/util/src/mem.c b/libs/util/src/mem.c
index eeca71f..faf8234 100644
--- a/libs/util/src/mem.c
+++ b/libs/util/src/mem.c
@@ -67,7 +67,9 @@ mem_malloc_mempool(struct os_mempool *mempool, int 
num_blocks, int block_size,
 }
 
 /**
- * Mallocs a block of memory and initializes an mbuf pool to use it.
+ * Mallocs a block of memory and initializes an mbuf pool to use it.  The
+ * specified block_size indicates the size of an mbuf acquired from the pool if
+ * it does not contain a pkthdr.
  *
  * @param mempool               The mempool to initialize.
  * @param mbuf_pool             The mbuf pool to initialize.
@@ -111,6 +113,24 @@ mem_malloc_mbuf_pool(struct os_mempool *mempool,
     return 0;
 }
 
+/**
+ * Mallocs a block of memory and initializes an mbuf pool to use it.  The
+ * specified block_size indicates the size of an mbuf acquired from the pool if
+ * it contains a pkthdr.
+ *
+ * @param mempool               The mempool to initialize.
+ * @param mbuf_pool             The mbuf pool to initialize.
+ * @param num_blocks            The total number of mbufs in the pool.
+ * @param block_size            The size of each mbuf.
+ * @param name                  The name to give the mempool.
+ * @param out_buf               On success, this points to the malloced memory.
+ *                                  Pass NULL if you don't need this
+ *                                  information.
+ *
+ * @return                      0 on success;
+ *                              OS_ENOMEM on malloc failure;
+ *                              Other OS code on unexpected error.
+ */
 int
 mem_malloc_mbufpkt_pool(struct os_mempool *mempool,
                         struct os_mbuf_pool *mbuf_pool, int num_blocks,

Reply via email to