heap: Add integer overflow checks on MALLOC_CAP_32BIT & MALLOC_CAP_EXEC

This commit is contained in:
Angus Gratton
2019-03-11 10:49:51 +11:00
committed by bot
parent 5beb2802e0
commit 2dd3344342
6 changed files with 42 additions and 20 deletions

View File

@@ -28,6 +28,8 @@ extern "C" {
for heap_caps_init.c to share heap information with heap_caps.c
*/
#define HEAP_SIZE_MAX (SOC_MAX_CONTIGUOUS_RAM_SIZE)
/* Type for describing each registered heap */
typedef struct heap_t_ {
uint32_t caps[SOC_MEMORY_TYPE_NO_PRIOS]; ///< Capabilities for the type of memory in this heap (as a prioritised set). Copied from soc_memory_types so it's in RAM not flash.