From patchwork Wed Dec 10 00:07:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 883 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325395; bh=nLA7mlmDXgxxwvLJG9k92mRkUVSqnvLg057FYNOF57c=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Pcr71outXKP/hPlORQgE24Sv+9Kbfk4viTPwrsvma26J8YRyHSPIzn6IMVe111WeA SHUFy7dSGWV65EjpSWRVlWrcW7T6lety6x1Bkqn9ilFnc/E82SDIdBUHpO3AMZxsDy voIeqVyCbjKooMbx3fE0//nTpcqVbyf6M00hIJLTAdEyucI1ursylnbKcngjnCMV8n 0fhRquxBkJ9RSfayefPkVbPZr1ZTOoaHaWZeVjj5t1SNj4wt+fGE1arIdoXFN+ePVH ZxLSbIDkpebN7MX9uBYYhT9SMIb24O2AVbiJJkA10wjLImEfEzCW9Ot7rYYz3tugXd SkBxwddVnq9PQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A62F168A44 for ; Tue, 9 Dec 2025 17:09:55 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 1ckbavhtW5T7 for ; Tue, 9 Dec 2025 17:09:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325395; bh=nLA7mlmDXgxxwvLJG9k92mRkUVSqnvLg057FYNOF57c=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Pcr71outXKP/hPlORQgE24Sv+9Kbfk4viTPwrsvma26J8YRyHSPIzn6IMVe111WeA SHUFy7dSGWV65EjpSWRVlWrcW7T6lety6x1Bkqn9ilFnc/E82SDIdBUHpO3AMZxsDy voIeqVyCbjKooMbx3fE0//nTpcqVbyf6M00hIJLTAdEyucI1ursylnbKcngjnCMV8n 0fhRquxBkJ9RSfayefPkVbPZr1ZTOoaHaWZeVjj5t1SNj4wt+fGE1arIdoXFN+ePVH ZxLSbIDkpebN7MX9uBYYhT9SMIb24O2AVbiJJkA10wjLImEfEzCW9Ot7rYYz3tugXd SkBxwddVnq9PQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 964236898C for ; Tue, 9 Dec 2025 17:09:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325394; bh=WKlL0mpSc/2uhJF5GG68UTIE20uV7hbAxWN3GHOfSxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iCM7HR5zZd8ytoTVWZI/mrcKGZvqmSHBuvuSBxbn4PO5ZLKGfnvIYDFuqE/0EIuyv PtlQOa3SPR0UWxOkXd2GrNPqbPXaqnuMC9UC9O5Sy12NBeEsD6YTI1BnDhXxi7xLgO K7ENQjoRittqPX03LJVRSNrqu75CsUJlHuyoeDRAcft3fKPNTUdmGcJJOsHR9gx9mx +glrAalyV31C9rSW9cWYZaUdD2hhAg2YuRkm4G7b59UNENyAtkPwSPVPYsHE2g6eB2 bolEr+Vq5ZF9PSYijHAZqNm7Yg1aqmpfDpLZ8PP/PbFnjDsZJ5QIMkW42584Oh2xgO BMxyWJsOfLmmQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 95C2A68972; Tue, 9 Dec 2025 17:09:54 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id h3uypt7ddxdP; Tue, 9 Dec 2025 17:09:54 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765325389; bh=UL5yiD/5HK+tCZbaviLVXZiN0Mb5Zf9YSkxfA3lEF3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B94HJUT2Or4H4GarhkFxcj++yJJiUAaaCkAIwFcUiBCQpCyajqiDkKFOhpswBNGRM lxR7QO49gKN6Hfo+1hpSsclB5CG+QrryRs/5Xrxys4iljB0LDbLBbSZ5gm44UwY4yb n9ZYrPlx2OHRHBSQ4HexD75SL+xBL1ZI57BVCiQTIE3p3CGFBym2AcZYTPq4SGK/oS J24TAYfrLpySRFATc3Flz1VxrmJdy4izE5SjzH/1YTiuWPTgOM/dGMQvLkWrMNZb83 wI2ng4CtA0Rxheq0T4HzFU0xx2gvzrgGShqBq/lAaSQ2sci3RAMookogIbyHOBK90/ S/r0dbmqnnASg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1A58968973; Tue, 9 Dec 2025 17:09:49 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 9 Dec 2025 17:07:17 -0700 Message-ID: <20251210000737.180797-27-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251210000737.180797-1-sjg@u-boot.org> References: <20251210000737.180797-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: BX3VVWT7RMYAYC3WRWPWI5V3NX6INVHR X-Message-ID-Hash: BX3VVWT7RMYAYC3WRWPWI5V3NX6INVHR X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 26/35] malloc: Remove warning messages during relocation List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass 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 Signed-off-by: Simon Glass --- common/mcheck_core.inc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/mcheck_core.inc.h b/common/mcheck_core.inc.h index 2839027564e..c2089add0d6 100644 --- a/common/mcheck_core.inc.h +++ b/common/mcheck_core.inc.h @@ -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; }