FreeRTOS-Kernel/portable
Gaurav-Aggarwal-AWS 82be77995e
Heap improvements (#462)
* Heap improvements

This commit makes the following improvements:

1. Add a check to heap_2 to track if a memory block is allocated to the
   application or not. The MSB of the size field is used for this
   purpose. The same check already exists in heap_4 and heap_5. This
   check prevents against double free.

2. Add a new flag configHEAP_CLEAR_MEMORY_ON_FREE to heap_2, heap_4 and
   heap_5. The application writer can set it to 1 in their
   FreeRTOSConfig.h to ensure that a block of memory allocated using
   pvPortMalloc is cleared (i.e. set to zero) when it is freed using
   vPortFree. If left undefined, configHEAP_CLEAR_MEMORY_ON_FREE
   defaults to 0 for backward compatibility. We recommend setting
   configHEAP_CLEAR_MEMORY_ON_FREE to 1 for better security.

3. Add a new API pvPortCalloc to heap_2, heap_4 and heap_5. This API
   has the following signature:
   void * pvPortCalloc( size_t xNum, size_t xSize );
   It allocates memory for an array of xNum objects each of which is of
   xSize and initializes all bytes in the allocated storage to zero. If
   allocation succeeds, it returns a pointer to the lowest byte in the
   allocated memory block. On failure, it returns a null pointer.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2022-02-24 10:52:10 -08:00
..
ARMClang Re-sync with upstream and stripping away none kernel related. 2020-02-10 13:45:57 -08:00
ARMv8M Add support for 16 MPU regions to GCC Cortex-M33 ports (#448) 2022-02-07 16:51:19 -08:00
BCC/16BitDOS Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
CCS fix typo (#399) 2021-10-06 15:32:07 -07:00
CodeWarrior Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
Common Change xPortRaisePrivilege and vPortResetPrivilege to macros 2021-11-15 15:09:12 -08:00
GCC Remove exception loop tags. (#457) 2022-02-17 15:28:04 -08:00
IAR Migrated RL78/IAR port to EWRL78v3+ (#461) 2022-02-24 10:04:46 -07:00
Keil Re-sync with upstream and stripping away none kernel related. 2020-02-10 13:45:57 -08:00
MemMang Heap improvements (#462) 2022-02-24 10:52:10 -08:00
MikroC/ARM_CM4F fix typo (#399) 2021-10-06 15:32:07 -07:00
MPLAB bugfix: Initialise stack correctly on dsPIC port (#405) 2021-11-01 12:38:37 -07:00
MSVC-MingW Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
oWatcom/16BitDOS Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
Paradigm/Tern_EE Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
Renesas Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
Rowley Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
RVDS Add option to disable unprivileged critical sections 2021-11-15 15:09:12 -08:00
SDCC/Cygnal Tidy up the 8051 sdcc port (#376) 2021-08-12 11:50:52 -07:00
Softune Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
Tasking/ARM_CM4F Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
ThirdParty portable/Xtensa_ESP32: Add SPDX license identifiers (#452) 2022-02-08 16:28:07 -08:00
WizC/PIC18 Normalize files with mixed line endings (introduced in commit 3a413d1) 2021-06-01 17:55:18 -07:00
CMakeLists.txt CMake: Move mpu_wrapper to ports library. (#459) 2022-02-22 08:30:09 -07:00
readme.txt Style: Change FreeRTOS websites in comments (#131) 2020-08-20 14:59:28 -07:00

Each real time kernel port consists of three files that contain the core kernel
components and are common to every port, and one or more files that are
specific to a particular microcontroller and/or compiler.


+ The FreeRTOS/Source/Portable/MemMang directory contains the five sample
memory allocators as described on the https://www.FreeRTOS.org WEB site.

+ The other directories each contain files specific to a particular
microcontroller or compiler, where the directory name denotes the compiler
specific files the directory contains.



For example, if you are interested in the [compiler] port for the [architecture]
microcontroller, then the port specific files are contained in
FreeRTOS/Source/Portable/[compiler]/[architecture] directory.  If this is the
only port you are interested in then all the other directories can be
ignored.