From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dd3520.kasserver.com (dd3520.kasserver.com [85.13.129.242]) by sourceware.org (Postfix) with ESMTPS id 29944385828E for ; Fri, 17 Feb 2023 19:10:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29944385828E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=patrickbader.eu Authentication-Results: sourceware.org; spf=none smtp.mailfrom=patrickbader.eu Received: from [192.168.0.144] (build.thingos.io [167.86.126.39]) by dd3520.kasserver.com (Postfix) with ESMTPSA id 7FADA30E00E3 for ; Fri, 17 Feb 2023 20:10:56 +0100 (CET) Message-ID: <9c0c090d-87fc-9f71-40f2-dd92c10cf6b8@patrickbader.eu> Date: Fri, 17 Feb 2023 20:10:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 To: newlib@sourceware.org Content-Language: en-US From: Patrick Bader Subject: Increased RAM usage after upgrade to newlib 4.3.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: / X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Dear newlib group members, I have just updated my firmware from newlib 4.2.0 to newlib 4.3.0 from the Arch Linux packages and found out that static memory consumption rose by about 300 bytes due to the standard input and output streams. However, I am not using these streams, but am using dynamic memory, which is using the _reent struct internally. As I found out, this struct is always populated with the global __sf file descriptors in the 4.3.0 version of newlib, which are about 300 bytes in total. The library is built with --enable-newlib-reent-small with the nano.spec and in the 4.2.0 version, _reent is initialized with some fake file descriptors: "__sf_fake_stdin,..." which are way smaller. Those fake versions are missing in newlib 4.3.0 and the __sf descriptors are used always. Is this intended behaviour or a regression? If it is intended, is there a way or some flag to get rid of the extra 300 bytes? I also do not need all those functions to be reentrant, but found no compilation parameter to turn this off. Thank you in advance for your help. Best, Patrick Bader