From patchwork Tue Aug 29 16:00:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 111233 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp1560751qge; Tue, 29 Aug 2017 09:09:10 -0700 (PDT) X-Received: by 10.55.73.216 with SMTP id w207mr6286422qka.337.1504022950915; Tue, 29 Aug 2017 09:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504022950; cv=none; d=google.com; s=arc-20160816; b=caKN35fiCHOhcxh3Cy4VxRmUe9IKSYfFkzbSWOa9cI6yKTJ0+C6/fgbevdk63Gb0my f42GIKePGKdab3L0bEBS9prACuFD0IaOwgfZzynouscrAP5+cklliQGqYh7U/n4E0VmT bWGoh7a2DJS3fFyTJU2RALflIJwSfyeYzy54jCVN9ojBrx9qNvAF/bbWSkIJqJpmL/Je PCrDlGWY4V67bg4sVsKot9sozJZwlwp6/Z2T43V8uQe7hXqCvYFDao1qyfvoQfq8cP70 a47bExVDNhffMEAJr2j5ct/bUeQNhucTO//Qhc/Sic3yxzXLT6nbMjqF2ezO+fiQU+hF aKig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from :arc-authentication-results; bh=s4gqX0UNl0kx+O+v8OGUG1k8na8vGn5IM0SnoG5lo3M=; b=lObYXCOCFPZTeUQM6WViFW8XY3XQ4pyvktLwTkgv+ON5l/BMpBAF0AmV908E7m+lMl zgZZ6ZjxjKzVW+K0aXm4etLR7f3VisXfi8fy1W6yJuSjD1ad14Xot82ZrS/s2gxEF3d4 k5rT8vjGVEEJaK51Uyp+U0JVg3MdhmWmgv+qoJET8Fb/YEhUWZKpR1R2Pso7Gchif8Kl 0vP3xqFO+v1PjhbXWyiak2jgB0qPqvbDdYXbWXEwWAFsbiN28S4v8l4TVaWmIJQDg2ut UWauEZYygWpsW64Qm7hyUGeiqi7mk7fP7Y0RZWceMlOSdnm6g4OmgcQLfSpKbbqRtbva tr3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w73si2145505qkg.333.2017.08.29.09.09.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 29 Aug 2017 09:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org Received: from localhost ([::1]:45849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmj4e-0001w8-DR for patch@linaro.org; Tue, 29 Aug 2017 12:09:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmiwV-0004Bo-26 for grub-devel@gnu.org; Tue, 29 Aug 2017 12:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmiwQ-0007l7-Vg for grub-devel@gnu.org; Tue, 29 Aug 2017 12:00:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:60429 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmiwQ-0007js-Or for grub-devel@gnu.org; Tue, 29 Aug 2017 12:00:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3A3D2AEA1; Tue, 29 Aug 2017 16:00:36 +0000 (UTC) From: Alexander Graf To: grub-devel@gnu.org Subject: [PATCH v3 0/2] efi: Free memory on exit Date: Tue, 29 Aug 2017 18:00:33 +0200 Message-Id: <20170829160035.11987-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Cc: phcoder@gmail.com, mchang@suse.com, Daniel Kiper , elliott@hpe.com MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" When exiting grub, we currently leave the heap allocated. This means that if we exit and rerun grub, after a few iterations we can run into memory shortage. This patch set frees the heap on exit. That way we can rerun grub many times without much problem. Alexander Graf (2): efi: Move grub_reboot() into kernel efi: Free malloc regions on exit grub-core/Makefile.core.def | 9 ++++--- grub-core/kern/efi/init.c | 1 + grub-core/kern/efi/mm.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ include/grub/efi/efi.h | 1 + include/grub/misc.h | 3 ++- 5 files changed, 68 insertions(+), 5 deletions(-) -- 2.12.3 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel