From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IGIrZ-0000AT-Fz for mharc-grub-devel@gnu.org; Wed, 01 Aug 2007 14:24:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IGIrX-0000A4-N0 for grub-devel@gnu.org; Wed, 01 Aug 2007 14:23:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IGIrW-00009j-7u for grub-devel@gnu.org; Wed, 01 Aug 2007 14:23:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGIrW-00009c-2q for grub-devel@gnu.org; Wed, 01 Aug 2007 14:23:58 -0400 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IGIrV-0005i0-QZ for grub-devel@gnu.org; Wed, 01 Aug 2007 14:23:57 -0400 Received: from [192.168.10.6] (helo=aragorn) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IGIrS-0006XU-FW; Wed, 01 Aug 2007 20:23:55 +0200 Received: from rmh by aragorn with local (Exim 4.63) (envelope-from ) id 1IGIui-0003Nd-Hw; Wed, 01 Aug 2007 20:27:16 +0200 Date: Wed, 1 Aug 2007 20:27:16 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20070801182716.GA12782@aragorn> References: <20070727080500.GA17986@aragorn> <20070727103310.GA1539@powerlinux.fr> <20070727191514.GA3461@aragorn> <20070729193011.GA7033@aragorn> <20070730201138.GA27359@aragorn> <20070731143823.GA16557@aragorn> <20070731194232.GA19385@aragorn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-Detected-Kernel: Genre and OS details not recognized. Cc: Subject: Re: [PATCH] efika memory issues X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2007 18:23:59 -0000 On Wed, Aug 01, 2007 at 12:34:21PM -0500, Hollis Blanchard wrote: > > Yup, it's a pain. Here's one idea: set a "GET_HEAP_FROM_WHEREVER" > flag, then later do Why a flag? Don't we want to do this unconditionally? MIN_HEAP_SIZE already determines wether it's appropiate or not. > We could try doing that in all situations, except: > - this method isn't often used, so firmwares can have bugs here Our code already implements most of this (in grub_available_iterate). Why not doing it ourselves instead of reliing on potentially-broken firmware? > - if MIN_HEAP_SIZE were small enough (e.g. 2MB), it would mean we > probably would still have 4MB+ free. However, that depends on the size > of the modules. I would hate to document "oh, if you can't load your > OS, try using fewer GRUB modules." On the other hand, we already have > this problem to some extent: if our modules are too large, we will > fail to allocate any heap. So maybe this isn't a practical concern. Yep, the problem already exists. In the end, it's just a matter of which MIN_HEAP_SIZE do we pick. -- Robert Millan My spam trap is honeypot@aybabtu.com. Note: this address is only intended for spam harvesters. Writing to it will get you added to my black list.