mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-07-04 16:13:33 +08:00
feat(heap): Add executable caps to IRAM region
This commit is contained in:
@ -31,6 +31,7 @@ extern "C" {
|
||||
*/
|
||||
#define HEAP_ALIGN(ptr) (((size_t)ptr + (HEAP_ALIGN_SIZE - 1)) & ~(HEAP_ALIGN_SIZE - 1))
|
||||
|
||||
#define MALLOC_CAP_EXEC (1 << 0) ///< Memory must be able to run executable code
|
||||
#define MALLOC_CAP_32BIT (1 << 1) ///< Memory must allow for aligned 32-bit data accesses
|
||||
#define MALLOC_CAP_8BIT (1 << 2) ///< Memory must allow for 8-bit data accesses
|
||||
#define MALLOC_CAP_DMA (1 << 3) ///< Memory must be able to accessed by DMA
|
||||
|
@ -46,7 +46,7 @@ void heap_caps_init(void)
|
||||
if (iram_size > HEAP_REGION_IRAM_MIN && iram_size < HEAP_REGION_IRAM_MAX) {
|
||||
g_heap_region[heap_region_num].start_addr = (uint8_t *)&_iram_end;
|
||||
g_heap_region[heap_region_num].total_size = iram_size;
|
||||
g_heap_region[heap_region_num].caps = MALLOC_CAP_32BIT;
|
||||
g_heap_region[heap_region_num].caps = MALLOC_CAP_32BIT | MALLOC_CAP_EXEC;
|
||||
heap_region_num++;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user