| Message ID | 20251201170529.3237986-15-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1764608924; bh=6k1XkZyv5NEFwFW+BKM9SvyijhZZ6wzF653Qh4VH7so=; 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=Rsv5Woe9PihVhkG3SnYK9wzkj4ExF3nWYUIQeWkXLN9lUZH5QZdPJFoorrWg5ywTc AXdho08Z8c7LQuMgSADogpqD35L0rP0tSG7QhPEjkgGFuqfEto1AvfZcMBeLFZci0n MBYNKSCy70Q6GFkNi/JutsQ3/zDw5bILD+2lE75chvKKjAZ4DxiykhSClgoSTQjKQ/ g3hLMnYGKmvzvAcLG1wNWToJ6ZPG8x2tGyLGmA7581jbxUU1QSSdfuiYxPqBGttiop zAqfYUQNnkui30QQPcb5QnmIdNuEwPqG7XE4sEhCS5TOje8XkvEFBT2oXaT3Zz8Lbt b4R/8pSZpxJoQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4954E6888B for <u-boot-concept@u-boot.org>; Mon, 1 Dec 2025 10:08:44 -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 Rj9mp9QZC6tH for <u-boot-concept@u-boot.org>; Mon, 1 Dec 2025 10:08:44 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764608924; bh=6k1XkZyv5NEFwFW+BKM9SvyijhZZ6wzF653Qh4VH7so=; 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=Rsv5Woe9PihVhkG3SnYK9wzkj4ExF3nWYUIQeWkXLN9lUZH5QZdPJFoorrWg5ywTc AXdho08Z8c7LQuMgSADogpqD35L0rP0tSG7QhPEjkgGFuqfEto1AvfZcMBeLFZci0n MBYNKSCy70Q6GFkNi/JutsQ3/zDw5bILD+2lE75chvKKjAZ4DxiykhSClgoSTQjKQ/ g3hLMnYGKmvzvAcLG1wNWToJ6ZPG8x2tGyLGmA7581jbxUU1QSSdfuiYxPqBGttiop zAqfYUQNnkui30QQPcb5QnmIdNuEwPqG7XE4sEhCS5TOje8XkvEFBT2oXaT3Zz8Lbt b4R/8pSZpxJoQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 38167686B9 for <u-boot-concept@u-boot.org>; Mon, 1 Dec 2025 10:08:44 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764608922; bh=GZytDSegE5lTH0jvgKyrwxM5AQU1DxJX8Tn5Uvbs93g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NtCNHMrDODwfWcjgOJ0vbuDmE6luljVClrORmBi6gAFNHvaYdxfKA7iNALsquwVjh llQv4z7ht3nFDGu5/BnRC+6IlQcLiAUW9Zj65Ghm240NEEBV2FLX2KFhAWMdplAOkB MVgfPjEKZinGwOJz9P0QSkmu7G3dQJ59aG0e0obhsTpcWZ9/WhQkFZ9R/UhPM6DNrm jMeyZVkt4r90H3Jx9KKf2DqooEuY8UQt3ediLVdYFcZUzJxIM7kEBlU8PzyJmMCoFF /VT/+5nQfRKMIKp/vdrt6x//OaVRXyWALwE6u3qkU8lkk5AaS5S2LCiHUxu4bHlKQ9 3YfG6MnZbqlMw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2A0F4688AE; Mon, 1 Dec 2025 10:08:42 -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 lJm1L7-TkmU2; Mon, 1 Dec 2025 10:08:42 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764608916; bh=hKx5AHpkial9nmvBQGAWRd/cuVdJZQ6rFDd+wq+rHZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c4bru8lV4ujxDu1+XdKyK1MRQCgjWUrFraH3/YiFCuaFlGiDnBMOw/OmnIaGEr0HK ntNEoU8kyW9vUeTK92D+MHdzkxCk1iuk8y3gVfG4ZyiDsJaqhvajOEpvOztjaj6nQ8 v4xVv6C0yA2B9MphNN4VCMFE1NKz2i9GAb4LHnd8CvO+BxO+VW0TyjLxeEDpwEMGLP RJUqWhqonlOxPo7xV8RpMOSaZoyWUQDUmQsbw2J/TNGPGlxX+521c4NMWmwhjxjQ+U A6czUBrf9JJKKoPcw2YiJqaKXfNPNcQw4os+8/pkd8yG6YSvfDbe6yEkeovJqIk6Jj 0Fjb5LnTNJ6EA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2FC5A688B6; Mon, 1 Dec 2025 10:08:36 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Mon, 1 Dec 2025 10:04:53 -0700 Message-ID: <20251201170529.3237986-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251201170529.3237986-1-sjg@u-boot.org> References: <20251201170529.3237986-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: AS764J6YOBD2KBMSCQJQWVBELWH3UDUV X-Message-ID-Hash: AS764J6YOBD2KBMSCQJQWVBELWH3UDUV 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 <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com>, Claude <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/37] malloc: Reduce code size with INSECURE and NO_MALLINFO List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/AS764J6YOBD2KBMSCQJQWVBELWH3UDUV/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
malloc: Import dlmalloc 2.8.6
|
|
Commit Message
Simon Glass
Dec. 1, 2025, 5:04 p.m. UTC
From: Simon Glass <simon.glass@canonical.com> Enable INSECURE=1 to skip runtime heap validation checks (except for sandbox), and NO_MALLINFO=1 to remove mallinfo support (except when unit tests are enabled). These reduce code size significantly. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- common/dlmalloc.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 98de6523758..268d3fea52a 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -563,6 +563,14 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP #define NO_MALLOC_STATS 1 #define USE_LOCKS 0 #define USE_SPIN_LOCKS 0 + +#if !CONFIG_IS_ENABLED(UNIT_TEST) +#define NO_MALLINFO 1 +#endif +#if !CONFIG_IS_ENABLED(SANDBOX) +#define INSECURE 1 +#endif + #define MALLOC_FAILURE_ACTION #define ABORT do {} while (1)