malloc: Remove warning messages during relocation

Pre-relocation heap allocations are expected to be discarded during
relocation - this is normal behavior, not a warning condition.
Remove the verbose messages that were printed for each chunk.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-12-02 09:53:04 +00:00
parent 332da3d6ed
commit 69257bf5a9

View File

@@ -289,14 +289,14 @@ static void mcheck_initialize(mcheck_abortfunc_t new_func, char pedantic_flag)
void mcheck_on_ramrelocation(size_t offset)
{
char *p;
int i;
// Simple, but inaccurate strategy: drop the pre-reloc heap
/*
* Pre-relocation heap allocations are no longer valid after
* relocation. Clear the registry since we can't track them.
*/
for (i = 0; i < REGISTRY_SZ; ++i)
if ((p = mcheck_registry[i]) != NULL ) {
printf("mcheck, WRN: forgetting %p chunk\n", p);
mcheck_registry[i] = 0;
}
mcheck_registry[i] = 0;
mcheck_chunk_count = 0;
}