From 6d320de48ae9821507d06b697648182bbdbe0537 Mon Sep 17 00:00:00 2001 From: Kevin Yonan Date: Mon, 24 Jun 2019 19:54:17 -0700 Subject: [PATCH] Update mempool_README.md --- mempool_README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mempool_README.md b/mempool_README.md index 49bdd84d1..9c54daa48 100644 --- a/mempool_README.md +++ b/mempool_README.md @@ -46,7 +46,7 @@ Explanation & Usage: We have two constructor functions: ```c struct MemPool MemPool_Create(size_t bytes); - struct MemPool MemPool_FromBuffer(size_t bytes, void *buf); + struct MemPool MemPool_FromBuffer(void *buf, size_t bytes); ``` To which you create a `struct MemPool` instance and give the function a max amount of memory you wish or require for your data. @@ -66,7 +66,7 @@ Explanation & Usage: Alternatively, if you're not in a position to use any kind of dynamic allocation from the operating system, you have the option to utilize an existing buffer as memory for the mempool: ```c char mem[64000]; - struct MemPool pool = MemPool_FromBuffer(sizeof mem, mem); + struct MemPool pool = MemPool_FromBuffer(mem, sizeof mem); ``` To allocate from the pool, we have two functions: