heap_caps: small fixes on comments plus cleaning

This commit is contained in:
Felipe Neves 2019-12-09 12:05:19 -03:00
parent 31145f38fa
commit 4909fdfe02
3 changed files with 5 additions and 7 deletions

@ -1 +1 @@
Subproject commit a7bc26b69768f7fb24f0c7976fae24b157b85b13
Subproject commit 968b8cc46dbee47b83318d5f31a8e7907199614b

View file

@ -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
//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)) {
uint32_t *dram_addr = (uint32_t *)ptr;
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);
assert(heap != NULL && "realloc() pointer is outside heap areas");
//with pointers that reside on diram space, we avoid to
//to use realloc implementation due to address translation issues,
//with pointers that reside on diram space, we avoid using
//the realloc implementation due to address translation issues,
//instead force a malloc/copy/free
ptr_in_diram_case = true;

@ -1 +1 @@
Subproject commit c9e3b53c6f04052943f97210b858cec805cc98d9
Subproject commit 31e24ae95a59e51d74f435f48fa21091b26c1430