mbed OS5
Fork of UIPEthernet by
Diff: utility/mempool.cpp
- Revision:
- 9:e55652bed36c
- Parent:
- 8:4acb22344932
--- a/utility/mempool.cpp Fri Jun 30 19:51:28 2017 +0000 +++ b/utility/mempool.cpp Sun Aug 06 16:01:26 2017 +0000 @@ -21,7 +21,7 @@ #define POOLOFFSET 1 -struct memblock MemoryPool:: blocks[MEMPOOL_NUM_MEMBLOCKS + 1]; +struct memblock myMemoryPool:: blocks[MEMPOOL_NUM_MEMBLOCKS + 1]; /** * @brief @@ -29,7 +29,7 @@ * @param * @retval */ -void MemoryPool::init(void) { +void myMemoryPool::init(void) { memset(&blocks[0], 0, sizeof(blocks)); blocks[POOLSTART].begin = MEMPOOL_STARTADDRESS; blocks[POOLSTART].size = 0; @@ -42,7 +42,7 @@ * @param * @retval */ -memhandle MemoryPool::allocBlock(memaddress size) { +memhandle myMemoryPool::allocBlock(memaddress size) { memblock* best = NULL; memhandle cur = POOLSTART; memblock* block = &blocks[POOLSTART]; @@ -132,7 +132,7 @@ * @param * @retval */ -void MemoryPool::freeBlock(memhandle handle) { +void myMemoryPool::freeBlock(memhandle handle) { if (handle == NOBLOCK) return; @@ -163,7 +163,7 @@ * @param * @retval */ -void MemoryPool::resizeBlock(memhandle handle, memaddress position) { +void myMemoryPool::resizeBlock(memhandle handle, memaddress position) { memblock* block = &blocks[handle]; block->begin += position; block->size -= position; @@ -175,7 +175,7 @@ * @param * @retval */ -void MemoryPool::resizeBlock(memhandle handle, memaddress position, memaddress size) { +void myMemoryPool::resizeBlock(memhandle handle, memaddress position, memaddress size) { memblock* block = &blocks[handle]; block->begin += position; block->size = size; @@ -187,6 +187,6 @@ * @param * @retval */ -memaddress MemoryPool::blockSize(memhandle handle) { +memaddress myMemoryPool::blockSize(memhandle handle) { return blocks[handle].size; }