From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ky6bt-0008VJ-Pa for mharc-grub-devel@gnu.org; Thu, 06 Nov 2008 10:17:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ky6br-0008S6-97 for grub-devel@gnu.org; Thu, 06 Nov 2008 10:17:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ky6bp-0008Qj-97 for grub-devel@gnu.org; Thu, 06 Nov 2008 10:17:22 -0500 Received: from [199.232.76.173] (port=37833 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky6bp-0008Qc-2S for grub-devel@gnu.org; Thu, 06 Nov 2008 10:17:21 -0500 Received: from aybabtu.com ([69.60.117.155]:47399) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ky6Xm-0005cy-B3; Thu, 06 Nov 2008 10:13:10 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Ky6X3-0006ih-EO; Thu, 06 Nov 2008 16:12:26 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1Ky6XO-0006WW-QQ; Thu, 06 Nov 2008 16:12:46 +0100 Date: Thu, 6 Nov 2008 16:12:46 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20081106151246.GD24460@thorin> References: <1224622323.31194.81.camel@localhost.localdomain> <1224784802.9254.56.camel@manoel-laptop> <1224788935.16720.38.camel@localhost.localdomain> <1224885201.7358.53.camel@manoel-laptop> <1225127982.4991.7.camel@dv> <1225814725.6767.20.camel@manoel-laptop> <1225815138.15410.19.camel@localhost.localdomain> <1225822685.6767.28.camel@manoel-laptop> <1225842506.2997.21.camel@dv> <1225905915.26835.71.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1225905915.26835.71.camel@localhost.localdomain> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Manoel , Pavel Roskin , Carlos Roberto do Nascimento Costa Subject: Re: PPC64 mlongcall gcc flag 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: Thu, 06 Nov 2008 15:17:23 -0000 On Wed, Nov 05, 2008 at 11:25:15AM -0600, Hollis Blanchard wrote: > > Module memory is allocated by grub_malloc(), but as you can see at > http://svn.savannah.gnu.org/viewvc/trunk/grub2/kern/ieee1275/init.c?revision=1806&root=grub&view=markup the GRUB heap capped at 4MB (I don't mean size, I mean the end of the heap). It's not really capped at 4 MB. It will cap it only when an heuristic tells it there's still enough room for heap: /* Avoid claiming anything above HEAP_MAX_ADDR, if possible. */ if ((addr < HEAP_MAX_ADDR) && /* if it's too late, don't bother */ (addr + len > HEAP_MAX_ADDR) && /* if it wasn't available anyway, don't bother */ (total + (HEAP_MAX_ADDR - addr) > HEAP_MIN_SIZE)) /* only limit ourselves when we can afford to */ Argueably, this is not my best piece of code... today I'd have implemented a payload relocator (like the one used by loader/i386/pc/multiboot.c) just so we can happily use everything in /memory/available as heap. And I'd even advice doing the same for powerpc (sharing code with i386 if possible). -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."