1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Fix typo from SISE to SIZE

This commit is contained in:
James Cotton 2011-07-12 12:48:06 -05:00
parent 2fe7ee40b1
commit 9e94f9fee9
2 changed files with 21 additions and 21 deletions

View File

@ -84,7 +84,7 @@ static union xRTOS_HEAP
} xHeap __attribute__ ((section (".heap")));
static size_t xNextFreeByte = ( size_t ) 0;
static size_t currentTOTAL_HEAP_SISE = configTOTAL_HEAP_SIZE;
static size_t currentTOTAL_HEAP_SIZE = configTOTAL_HEAP_SIZE;
/*-----------------------------------------------------------*/
@ -104,7 +104,7 @@ void *pvReturn = NULL;
vTaskSuspendAll();
{
/* Check there is enough room left for the allocation. */
if( ( ( xNextFreeByte + xWantedSize ) < currentTOTAL_HEAP_SISE ) &&
if( ( ( xNextFreeByte + xWantedSize ) < currentTOTAL_HEAP_SIZE ) &&
( ( xNextFreeByte + xWantedSize ) > xNextFreeByte ) )/* Check for overflow. */
{
/* Return the next free byte then increment the index past this
@ -147,14 +147,14 @@ void vPortInitialiseBlocks( void )
size_t xPortGetFreeHeapSize( void )
{
return ( currentTOTAL_HEAP_SISE - xNextFreeByte );
return ( currentTOTAL_HEAP_SIZE - xNextFreeByte );
}
/*-----------------------------------------------------------*/
void xPortIncreaseHeapSize( size_t bytes )
{
vTaskSuspendAll();
currentTOTAL_HEAP_SISE = configTOTAL_HEAP_SIZE + bytes;
currentTOTAL_HEAP_SIZE = configTOTAL_HEAP_SIZE + bytes;
xTaskResumeAll();
}
/*-----------------------------------------------------------*/

View File

@ -101,7 +101,7 @@ static xBlockLink xStart, xEnd;
/* Keeps track of the number of free bytes remaining, but says nothing about
fragmentation. */
static size_t xFreeBytesRemaining = configTOTAL_HEAP_SIZE;
static size_t currentTOTAL_HEAP_SISE = configTOTAL_HEAP_SIZE;
static size_t currentTOTAL_HEAP_SIZE = configTOTAL_HEAP_SIZE;
/* STATIC FUNCTIONS ARE DEFINED AS MACROS TO MINIMIZE THE FUNCTION CALL DEPTH. */
@ -141,13 +141,13 @@ xBlockLink *pxFirstFreeBlock; \
xStart.xBlockSize = ( size_t ) 0; \
\
/* xEnd is used to mark the end of the list of free blocks. */ \
xEnd.xBlockSize = currentTOTAL_HEAP_SISE; \
xEnd.xBlockSize = currentTOTAL_HEAP_SIZE; \
xEnd.pxNextFreeBlock = NULL; \
\
/* To start with there is a single free block that is sized to take up the \
entire heap space. */ \
pxFirstFreeBlock = ( void * ) xHeap.ucHeap; \
pxFirstFreeBlock->xBlockSize = currentTOTAL_HEAP_SISE; \
pxFirstFreeBlock->xBlockSize = currentTOTAL_HEAP_SIZE; \
pxFirstFreeBlock->pxNextFreeBlock = &xEnd; \
}
/*-----------------------------------------------------------*/
@ -182,7 +182,7 @@ void *pvReturn = NULL;
}
}
if( ( xWantedSize > 0 ) && ( xWantedSize < currentTOTAL_HEAP_SISE ) )
if( ( xWantedSize > 0 ) && ( xWantedSize < currentTOTAL_HEAP_SIZE ) )
{
/* Blocks are stored in byte order - traverse the list from the start
(smallest) block until one of adequate size is found. */
@ -282,8 +282,8 @@ void xPortIncreaseHeapSize( size_t bytes )
{
xBlockLink *pxNewBlockLink;
vTaskSuspendAll();
currentTOTAL_HEAP_SISE = configTOTAL_HEAP_SIZE + bytes;
xEnd.xBlockSize = currentTOTAL_HEAP_SISE;
currentTOTAL_HEAP_SIZE = configTOTAL_HEAP_SIZE + bytes;
xEnd.xBlockSize = currentTOTAL_HEAP_SIZE;
xFreeBytesRemaining += bytes;
/* Insert the new block into the list of free blocks. */
pxNewBlockLink = ( void * ) &xHeap.ucHeap[ configTOTAL_HEAP_SIZE ];