heap_caps: Allow for possibility a region is too small to register a heap

May happen due to sdkconfig, static allocation of RAM.

Closes https://github.com/espressif/esp-idf/issues/802
This commit is contained in:
Angus Gratton
2017-07-19 17:10:33 +10:00
committed by Angus Gratton
parent d436331faf
commit 0feb40833a
3 changed files with 37 additions and 15 deletions

View File

@@ -26,7 +26,7 @@
/* Type for describing each registered heap */
typedef struct {
size_t type;
uint32_t caps[SOC_MEMORY_TYPE_NO_PRIOS]; ///< Capabilities for the type of memory in this healp (as a prioritised set). Copied from soc_memory_types so it's in RAM not flash.
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.
intptr_t start;
intptr_t end;
portMUX_TYPE heap_mux;
@@ -36,3 +36,5 @@ typedef struct {
extern heap_t *registered_heaps;
extern size_t num_registered_heaps;
bool heap_caps_match(const heap_t *heap, uint32_t caps);