From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxyKl-00068n-9W for qemu-devel@nongnu.org; Wed, 14 Oct 2009 03:31:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxyKg-00067n-7F for qemu-devel@nongnu.org; Wed, 14 Oct 2009 03:31:42 -0400 Received: from [199.232.76.173] (port=34986 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxyKg-00067k-3c for qemu-devel@nongnu.org; Wed, 14 Oct 2009 03:31:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39619) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxyKf-00023q-Ln for qemu-devel@nongnu.org; Wed, 14 Oct 2009 03:31:37 -0400 Message-ID: <4AD57E55.9050308@redhat.com> Date: Wed, 14 Oct 2009 09:31:33 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/4] use rom loader for pc bios. References: <1255431978-4992-1-git-send-email-kraxel@redhat.com> <1255431978-4992-5-git-send-email-kraxel@redhat.com> <4AD4D966.8040005@gmx.net> In-Reply-To: <4AD4D966.8040005@gmx.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Carl-Daniel Hailfinger Cc: qemu-devel@nongnu.org >> bios_offset = qemu_ram_alloc(bios_size); >> - ret = load_image(filename, qemu_get_ram_ptr(bios_offset)); >> - if (ret != bios_size) { >> + ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size)); >> > > Memory leak? I don't think so. > AFAICS the qemu_ram_alloc above should be removed and maybe > bios_offset needs to be killed completely. Why? You still need the memory for the bios rom, even if the way it gets loaded changes. cheers, Gerd