mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
heap_caps: small fixes on comments plus cleaning
This commit is contained in:
Submodule components/expat/expat updated: a7bc26b697...968b8cc46d
@@ -293,18 +293,16 @@ IRAM_ATTR void *heap_caps_realloc( void *ptr, size_t size, int caps)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//The pointer to memory may be aliased, we need to
|
//The pointer to memory may be aliased, we need to
|
||||||
//recover it before to manage a new allocation:
|
//recover the corresponding address before to manage a new allocation:
|
||||||
if(esp_ptr_in_diram_iram((void *)ptr)) {
|
if(esp_ptr_in_diram_iram((void *)ptr)) {
|
||||||
uint32_t *dram_addr = (uint32_t *)ptr;
|
uint32_t *dram_addr = (uint32_t *)ptr;
|
||||||
dram_ptr = (void *)dram_addr[-1];
|
dram_ptr = (void *)dram_addr[-1];
|
||||||
|
|
||||||
//printf("[HEAP_CAPS_MALLOC]: obtained pointer that was aliased: %p \n", (void *)ptr);
|
|
||||||
|
|
||||||
heap = find_containing_heap(dram_ptr);
|
heap = find_containing_heap(dram_ptr);
|
||||||
assert(heap != NULL && "realloc() pointer is outside heap areas");
|
assert(heap != NULL && "realloc() pointer is outside heap areas");
|
||||||
|
|
||||||
//with pointers that reside on diram space, we avoid to
|
//with pointers that reside on diram space, we avoid using
|
||||||
//to use realloc implementation due to address translation issues,
|
//the realloc implementation due to address translation issues,
|
||||||
//instead force a malloc/copy/free
|
//instead force a malloc/copy/free
|
||||||
ptr_in_diram_case = true;
|
ptr_in_diram_case = true;
|
||||||
|
|
||||||
|
Submodule components/lwip/lwip updated: c9e3b53c6f...31e24ae95a
Reference in New Issue
Block a user