From ee0a82be1b9e0c4892f53b571b3b61a2b193edb9 Mon Sep 17 00:00:00 2001 From: Moral-Hao Date: Sun, 6 Aug 2023 14:07:44 +0800 Subject: [PATCH 1/2] Fix bug of heap_2 introduced by pr738. (#743) * Fix bug of heap_2 introduced by pr738. * Fix formatting check Signed-off-by: Gaurav Aggarwal --------- Signed-off-by: Gaurav Aggarwal Co-authored-by: moral-hao <405197809@qq.com> Co-authored-by: Gaurav Aggarwal --- portable/MemMang/heap_2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/portable/MemMang/heap_2.c b/portable/MemMang/heap_2.c index 5c3cb55b16d..c0414439578 100644 --- a/portable/MemMang/heap_2.c +++ b/portable/MemMang/heap_2.c @@ -229,9 +229,10 @@ void * pvPortMalloc( size_t xWantedSize ) pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; pxBlock->xBlockSize = xWantedSize; - /* Insert the new block into the list of free blocks. */ - pxNewBlockLink->pxNextFreeBlock = pxPreviousBlock->pxNextFreeBlock; - pxPreviousBlock->pxNextFreeBlock = pxNewBlockLink; + /* Insert the new block into the list of free blocks. + * The list of free blocks is sorted by their size, we have to + * iterate to find the right place to insert new block. */ + prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); } xFreeBytesRemaining -= pxBlock->xBlockSize; From 4689d8ff86f9d1730afd790dd9b5c40d71c437dd Mon Sep 17 00:00:00 2001 From: Leonardo de Araujo <46436462+araujo88@users.noreply.github.com> Date: Mon, 7 Aug 2023 00:42:05 -0300 Subject: [PATCH 2/2] fix: typos in README.md (#744) Co-authored-by: ActoryOu --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 38cb5862221..54090211808 100644 --- a/README.md +++ b/README.md @@ -102,15 +102,15 @@ See the readme file in the ```./portable``` directory for more information. FreeRTOS files are formatted using the "uncrustify" tool. The configuration file used by uncrustify can be found in the [.github/uncrustify.cfg](.github/uncrustify.cfg) file. ### Line Endings -File checked into the FreeRTOS-Kernel repository use unix-style LF line endings for the best compatbility with git. +File checked into the FreeRTOS-Kernel repository use unix-style LF line endings for the best compatibility with git. -For optmial compatibility with Microsoft Windows tools, it is best to enable the git autocrlf feature. You can eanble this setting for the current repository using the following command: +For optimal compatibility with Microsoft Windows tools, it is best to enable the git autocrlf feature. You can enable this setting for the current repository using the following command: ``` git config core.autocrlf true ``` ### Git History Optimizations -Some commits in this repository perform large refactors which touch many lines and lead to unwanted behavior when using the `git blame` command. You can configure git to ignore the list of large refactor commits in this repository with the followig command: +Some commits in this repository perform large refactors which touch many lines and lead to unwanted behavior when using the `git blame` command. You can configure git to ignore the list of large refactor commits in this repository with the following command: ``` git config blame.ignoreRevsFile .git-blame-ignore-revs ```