mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-423: Fixing heap2 (puting back bytes from the post heap stack (used during init) back into the free list).
Tested this heap2 at runtime with CC and new compiler since old one (current) triggers strict alliasing error. That's ok since strict aliasing is disabled on OP, and CC only use heap1.
This commit is contained in:
parent
9b9b5a1367
commit
36f28f8037
@ -280,10 +280,15 @@ void vPortInitialiseBlocks( void )
|
||||
|
||||
void xPortIncreaseHeapSize( size_t bytes )
|
||||
{
|
||||
xBlockLink *pxNewBlockLink;
|
||||
vTaskSuspendAll();
|
||||
currentTOTAL_HEAP_SISE = configTOTAL_HEAP_SIZE + bytes;
|
||||
xEnd.xBlockSize = currentTOTAL_HEAP_SISE;
|
||||
xFreeBytesRemaining += bytes;
|
||||
/* Insert the new block into the list of free blocks. */
|
||||
pxNewBlockLink = ( void * ) &xHeap.ucHeap[ configTOTAL_HEAP_SIZE ];
|
||||
pxNewBlockLink->xBlockSize = bytes;
|
||||
prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user