From nobody Mon Oct 6 16:26:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1583412440; cv=none; d=zohomail.com; s=zohoarc; b=YyGllur8TRfmb43aHbjMGnjlgpbgiDU+IfGAy4qkb3nHC9Gz8Ha3s4wer9x7wKsReJ0GlWRAWXWXQKI1kcV/7//CpUckJnFPpR55TyHNJyzfVEoPMpNDt2g2e6UVfg9nLFSnUiQMzLgo+UhcMrysLv3zTvBd2fIJDi4teSTilQU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583412440; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HfnT8d1lOc8oOW388s3B4mt/9tuFbIC8PeXMCcmaMOk=; b=Esoow7ppQw9OhOusW14RZjB3iEGVPtdySmr3bjIE39w+7Ke/nMX2DsYKTEyOreg3SSHR3fSeSU5+nE1jJphTXmG5FCBTh26iDQ0pfq8qcuN3rnQ9wJeundJ6i1Lzrweh63/IzNI+mjM46pnYlAelxJpqXUxEVmmqxIZCyWlsERI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583412440484475.96481771485185; Thu, 5 Mar 2020 04:47:20 -0800 (PST) Received: from localhost ([::1]:48346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9puJ-0000PV-DH for importer@patchew.org; Thu, 05 Mar 2020 07:47:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41629) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9psn-0006Un-Oi for qemu-devel@nongnu.org; Thu, 05 Mar 2020 07:45:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9psm-0001PW-Ou for qemu-devel@nongnu.org; Thu, 05 Mar 2020 07:45:45 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29636 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9psm-0001Oy-LV for qemu-devel@nongnu.org; Thu, 05 Mar 2020 07:45:44 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191--E0rBE8jPSKLYV0Jur9KIw-1; Thu, 05 Mar 2020 07:45:40 -0500 Received: by mail-wr1-f70.google.com with SMTP id m13so2266969wrw.3 for ; Thu, 05 Mar 2020 04:45:40 -0800 (PST) Received: from localhost.localdomain (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id m3sm25274864wrx.9.2020.03.05.04.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2020 04:45:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583412344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HfnT8d1lOc8oOW388s3B4mt/9tuFbIC8PeXMCcmaMOk=; b=arjfed0zfDmzfwX7S+UVdHfY7DDTi/rdqzG6nXzwk1Z6OB8mjeSo1ZhCvnBxJtR3E3icZJ lOvtZUM83lxPVuHRXN7gbImEOB4tS7Txv6i2/lNd6xx5W4CsFGkdiF1WoTjUUAjQ7weGxa +i27of4MHO1dnoijeeh03lNRQGMsMdU= X-MC-Unique: -E0rBE8jPSKLYV0Jur9KIw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7WthtJEuF/N+eAMadHF0Sd51QGcmnmZoupRAgou8XDo=; b=rDdApjMtgSXSD7Ggh0la+DZeeOQta5NJpQPJnbL86TRTWfGaforpK0HBfquAwbplr7 7Z7KkB6jvsR8qQSledUG0f5I7Q60JCWjVr+QQwn0RCiKHJmCzGpHNulGYyjAB5ZYfcB6 PBpSLX9f2LI+fP4/Hz9gaEVosD9pKbSL2XAmPIcUU9lJ5BoFE2cGqQ+95ml/5oAPebUQ SgY643/KZUGesjEmV5M3jXDn6jaouSBhl9Q/LtpJkJRp1qYUHmhGUP+UFxdybpVkNy0k WH8PAg0KpbEJbf3Ck85A7JxDb4jXzh7xF787PwYe94yIjX0/P2pJCQt3xk2RBMlko1OQ LWNg== X-Gm-Message-State: ANhLgQ1Wo0BYPIwOToCPf6wbK6NSLJjcCqcsBHG+v1TkNhlT8JEQTE36 vZkycfgWUpnmRDACFi22lwPNWZ9eYlXxxxVujODrNMnIFkhX7uvyyB4mHTq6v6jw3ovK8BLGPEw A3U4O+9QtVUiK8Pk= X-Received: by 2002:a1c:6884:: with SMTP id d126mr9090948wmc.38.1583412339471; Thu, 05 Mar 2020 04:45:39 -0800 (PST) X-Google-Smtp-Source: ADFU+vszSRNbFNB70lPwi1+dJrIysVzEGOnhLy69XyNqvWJZ5pFATslY5R70zu29Mm0icEgl9lXtrw== X-Received: by 2002:a1c:6884:: with SMTP id d126mr9090927wmc.38.1583412339278; Thu, 05 Mar 2020 04:45:39 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH v2 2/9] hw/audio/fmopl: Move ENV_CURVE to .heap to save 32KiB of .bss Date: Thu, 5 Mar 2020 13:45:18 +0100 Message-Id: <20200305124525.14555-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200305124525.14555-1-philmd@redhat.com> References: <20200305124525.14555-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Fleytman , Jason Wang , Christian Schoenebeck , Greg Kurz , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefano Garzarella Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" This buffer is only used by the adlib audio device. Move it to the .heap to release 32KiB of .bss (size reported on x86_64 host). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefano Garzarella --- hw/audio/fmopl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c index 173a7521f2..356d4dfbca 100644 --- a/hw/audio/fmopl.c +++ b/hw/audio/fmopl.c @@ -186,7 +186,7 @@ static int32_t *VIB_TABLE; =20 /* envelope output curve table */ /* attack + decay + OFF */ -static int32_t ENV_CURVE[2*EG_ENT+1]; +static int32_t *ENV_CURVE; =20 /* multiple table */ #define ML 2 @@ -1090,6 +1090,7 @@ FM_OPL *OPLCreate(int clock, int rate) OPL->clock =3D clock; OPL->rate =3D rate; OPL->max_ch =3D max_ch; + ENV_CURVE =3D g_new(int32_t, 2 * EG_ENT + 1); /* init grobal tables */ OPL_initialize(OPL); /* reset chip */ @@ -1127,6 +1128,7 @@ void OPLDestroy(FM_OPL *OPL) #endif OPL_UnLockTable(); free(OPL); + g_free(ENV_CURVE); } =20 /* ---------- Option handlers ---------- */ --=20 2.21.1