diff options
Diffstat (limited to 'common/src/tx_byte_pool_create.c')
| -rw-r--r-- | common/src/tx_byte_pool_create.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/src/tx_byte_pool_create.c b/common/src/tx_byte_pool_create.c index 2225e61b..ffd35e54 100644 --- a/common/src/tx_byte_pool_create.c +++ b/common/src/tx_byte_pool_create.c @@ -89,7 +89,7 @@ ALIGN_TYPE *free_ptr; /* Initialize the byte pool control block to all zeros. */ TX_MEMSET(pool_ptr, 0, (sizeof(TX_BYTE_POOL))); - /* Round the pool size down to something that is evenly divisible by + /* Round the pool size down to something that is evenly divisible by an ULONG. */ pool_size = (pool_size/(sizeof(ALIGN_TYPE))) * (sizeof(ALIGN_TYPE)); @@ -104,17 +104,17 @@ ALIGN_TYPE *free_ptr; pool_ptr -> tx_byte_pool_list = TX_VOID_TO_UCHAR_POINTER_CONVERT(pool_start); pool_ptr -> tx_byte_pool_search = TX_VOID_TO_UCHAR_POINTER_CONVERT(pool_start); - /* Initially, the pool will have two blocks. One large block at the + /* Initially, the pool will have two blocks. One large block at the beginning that is available and a small allocated block at the end of the pool that is there just for the algorithm. Be sure to count the available block's header in the available bytes count. */ pool_ptr -> tx_byte_pool_available = pool_size - ((sizeof(VOID *)) + (sizeof(ALIGN_TYPE))); pool_ptr -> tx_byte_pool_fragments = ((UINT) 2); - + /* Each block contains a "next" pointer that points to the next block in the pool followed by a ALIGN_TYPE field that contains either the constant TX_BYTE_BLOCK_FREE (if the block is free) or a pointer to the owning pool (if the block is allocated). */ - + /* Calculate the end of the pool's memory area. */ block_ptr = TX_VOID_TO_UCHAR_POINTER_CONVERT(pool_start); block_ptr = TX_UCHAR_POINTER_ADD(block_ptr, pool_size); @@ -177,7 +177,7 @@ ALIGN_TYPE *free_ptr; /* Increment the number of created byte pools. */ _tx_byte_pool_created_count++; - + /* Optional byte pool create extended processing. */ TX_BYTE_POOL_CREATE_EXTENSION(pool_ptr) |
