mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
fix(memory-utils): Use esp_ptr_in_tcm to check TCM range
This commit is contained in:
committed by
Guillaume Souchere
parent
0916afabae
commit
ab14bbaa00
@@ -53,7 +53,7 @@ bool esp_ptr_byte_accessible(const void *p)
|
|||||||
bool r;
|
bool r;
|
||||||
r = (ip >= SOC_BYTE_ACCESSIBLE_LOW && ip < SOC_BYTE_ACCESSIBLE_HIGH);
|
r = (ip >= SOC_BYTE_ACCESSIBLE_LOW && ip < SOC_BYTE_ACCESSIBLE_HIGH);
|
||||||
#if SOC_MEM_TCM_SUPPORTED
|
#if SOC_MEM_TCM_SUPPORTED
|
||||||
r |= (ip >= SOC_TCM_LOW && ip < SOC_TCM_HIGH);
|
r |= esp_ptr_in_tcm(p);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP
|
#if CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP
|
||||||
/* For ESP32 case, RTC fast memory is accessible to PRO cpu only and hence
|
/* For ESP32 case, RTC fast memory is accessible to PRO cpu only and hence
|
||||||
|
@@ -279,7 +279,7 @@ inline static bool esp_ptr_internal(const void *p) {
|
|||||||
r = ((intptr_t)p >= SOC_MEM_INTERNAL_LOW && (intptr_t)p < SOC_MEM_INTERNAL_HIGH);
|
r = ((intptr_t)p >= SOC_MEM_INTERNAL_LOW && (intptr_t)p < SOC_MEM_INTERNAL_HIGH);
|
||||||
|
|
||||||
#if SOC_MEM_TCM_SUPPORTED
|
#if SOC_MEM_TCM_SUPPORTED
|
||||||
r |= ((intptr_t)p >= SOC_TCM_LOW && (intptr_t)p < SOC_TCM_HIGH);
|
r |= esp_ptr_in_tcm(p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SOC_RTC_SLOW_MEM_SUPPORTED
|
#if SOC_RTC_SLOW_MEM_SUPPORTED
|
||||||
|
Reference in New Issue
Block a user