From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by sourceware.org (Postfix) with ESMTPS id 0BF293858C3A for ; Tue, 15 Mar 2022 20:54:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0BF293858C3A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f46.google.com with SMTP id w7so530711lfd.6 for ; Tue, 15 Mar 2022 13:54:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=711v1+G7b19naG791sbTZBKmHtapoPBSX9qABDeTN5g=; b=C8eHuxPwBIvvMqDGYS+bru2grKXjta75nI/X2Q3Rib4bXHFIk85rO6+YSvC/qQDLap A8/xvOyZ+/9jZWvjA4ut4/NDEHqY4KAB4okQ/390BowShds6YpBdcTh6eDqpaFDTWmhv o+SECdLfyXY4QoD/JUjdBxLtbitk3gNNYstfe0vx3z9MsB6Jn6P5xeAarFFIhwgFz/t9 DBvCpqHMpjLCq3jPvc7ZbCceQxenFTrH7Yl6MfgmnAVs+bHiLzm3e4j5jtQNacbq1YZ8 HjsmdAUL5YNDTylxOgtTf35PZMDAHhERo53r5NjEBuQhg2Ijmt/9pdso3dYJ5K42GQJ9 mqOw== X-Gm-Message-State: AOAM5312oX81Tvj6x51X5P1hKHmWf3A3OoMkutjqKNPe4qg6H+4Al0b0 MTGSYth8Xfm6TY6D4a5MYruCAHAkxMj4DQ== X-Google-Smtp-Source: ABdhPJwlO7H6ZcfCcurlh6Kyncb5mBsbAk7FvocUHMVSEIOdzysMoZEd+TDT/SqEav7XSZCCSBq3gg== X-Received: by 2002:a05:6512:3741:b0:443:d5c1:404b with SMTP id a1-20020a056512374100b00443d5c1404bmr17272912lfs.565.1647377663343; Tue, 15 Mar 2022 13:54:23 -0700 (PDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id z23-20020a2e3517000000b00247ebea6422sm14949ljz.13.2022.03.15.13.54.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Mar 2022 13:54:23 -0700 (PDT) Received: by mail-lj1-f175.google.com with SMTP id h11so604840ljb.2 for ; Tue, 15 Mar 2022 13:54:22 -0700 (PDT) X-Received: by 2002:a2e:9119:0:b0:247:e306:1379 with SMTP id m25-20020a2e9119000000b00247e3061379mr17509479ljg.361.1647377662318; Tue, 15 Mar 2022 13:54:22 -0700 (PDT) MIME-Version: 1.0 References: <20220315151644.369-1-joel@rtems.org> In-Reply-To: Reply-To: joel@rtems.org From: Joel Sherrill Date: Tue, 15 Mar 2022 15:54:11 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH newlib] libc/include/malloc.h: Add prototype for GNU extension malloc_usable_size() To: Sebastian Huber Cc: Newlib X-Spam-Status: No, score=-3037.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2022 20:54:27 -0000 On Tue, Mar 15, 2022, 1:43 PM Sebastian Huber < sebastian.huber@embedded-brains.de> wrote: > On 15/03/2022 16:47, Mike Frysinger wrote: > > On 15 Mar 2022 10:16, Joel Sherrill wrote: > >> This is not provided by the newlib malloc implementation but may > >> be available in external implementations. > >> --- > >> newlib/libc/include/malloc.h | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/newlib/libc/include/malloc.h b/newlib/libc/include/malloc= .h > >> index a9dc5bca6..e73095e1e 100644 > >> --- a/newlib/libc/include/malloc.h > >> +++ b/newlib/libc/include/malloc.h > >> @@ -137,6 +137,10 @@ extern void __malloc_lock(struct _reent *); > >> > >> extern void __malloc_unlock(struct _reent *); > >> > >> +#if __GNU_VISIBLE > >> +extern size_t malloc_usable_size(void *); > >> +#endif > >> + > > i'm confused. isn't this prototype already defined in this header file > > on line 101 above where you added this ? > > Yes, and it is implemented by the Newlib malloc. > Thanks Sebastian. Good catch. The prototype isn't wrapped by __GNU_VISIBLE. Should it be? --joel > > -- > embedded brains GmbH > Herr Sebastian HUBER > Dornierstr. 4 > 82178 Puchheim > Germany > email: sebastian.huber@embedded-brains.de > phone: +49-89-18 94 741 - 16 > fax: +49-89-18 94 741 - 08 > > Registergericht: Amtsgericht M=C3=BCnchen > Registernummer: HRB 157899 > Vertretungsberechtigte Gesch=C3=A4ftsf=C3=BChrer: Peter Rasmussen, Thomas= D=C3=B6rfler > Unsere Datenschutzerkl=C3=A4rung finden Sie hier: > https://embedded-brains.de/datenschutzerklaerung/ >