From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66]) by sourceware.org (Postfix) with ESMTPS id CAD663858C5E for ; Wed, 17 May 2023 20:07:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CAD663858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 384253C020F7C; Wed, 17 May 2023 13:07:59 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xFk14LTHHnRR; Wed, 17 May 2023 13:07:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 020753C097AFC; Wed, 17 May 2023 13:07:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 020753C097AFC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1684354079; bh=TrNBzqHcx+AvyzQ7Xw1Ndcc49AHtCCrqqrGmc9nEVOU=; h=Message-ID:Date:MIME-Version:To:From; b=m/kxVFwwlLdNITDQuiz5jhgYc8xlscyprN8GdzZV8Nk7c2IIq94IU67VsKqJoQOu/ fBEWMQAk/R/DsuPaCbmXGNmEy7FHo+YeeqogXLf8ZlAzNLrZ5RTCikwksDQfaLz42w wJzid8Ss47gTqj1dOzZr6JWTq5Xr1dcAEDluJ6SFykpSsw8FANrMaVZnzRRw8KEb+N K559Vq3BNq68N2fjcA3tAWFDyqu4vEOrk+VZLrabPuIMJ6uftuyC55RAQCsxWG9p6u uCorO6EsxE/K9V1syTZyb2DR/hakfKf0/J8PQk3jQfFo9TV8xizyvj1N4r6j0bgPSc KyGsmtlevf/oA== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id d4GcGxqGxzO0; Wed, 17 May 2023 13:07:58 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id D29B73C020F7C; Wed, 17 May 2023 13:07:58 -0700 (PDT) Message-ID: <8ddf10d7-e084-6530-c143-f1691870e863@cs.ucla.edu> Date: Wed, 17 May 2023 13:07:58 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3] vfprintf-internal: Replace alloca with malloc. Content-Language: en-US To: Joe Simmons-Talbott Cc: libc-alpha@sourceware.org References: <20230515185012.2768620-1-josimmon@redhat.com> <8e9beea2-b128-83f1-dead-2c3866e28182@cs.ucla.edu> <20230517194156.GH176347@oak> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <20230517194156.GH176347@oak> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-05-17 12:41, Joe Simmons-Talbott wrote: > It seems to me that the code to grow the scratch buffer would be more > difficult to understand than calling malloc separately. True, but in the normal case this means malloc will not be called (as the data will live in a small scratch buffer on the stack), and that's a win worth striving for.