mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 10:46:02 -04:00
Merge branch 'bugfix/heap_trace_realloc' into 'master'
heap_trace: fix bug in realloc for copying trace record See merge request !1643
This commit is contained in:
commit
5bba9664ac
@ -373,11 +373,11 @@ static IRAM_ATTR __attribute__((noinline)) void *trace_realloc(void *p, size_t s
|
|||||||
record_free(p, callers);
|
record_free(p, callers);
|
||||||
}
|
}
|
||||||
heap_trace_record_t rec = {
|
heap_trace_record_t rec = {
|
||||||
.address = p,
|
.address = r,
|
||||||
.ccount = ccount,
|
.ccount = ccount,
|
||||||
.size = size,
|
.size = size,
|
||||||
};
|
};
|
||||||
memcpy(rec.alloced_by, callers, sizeof(heap_trace_record_t) * STACK_DEPTH);
|
memcpy(rec.alloced_by, callers, sizeof(void *) * STACK_DEPTH);
|
||||||
record_allocation(&rec);
|
record_allocation(&rec);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
Loading…
Reference in New Issue
Block a user