Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CjhqZ-0002rD-4m for mharc-grub-devel@gnu.org; Wed, 29 Dec 2004 12:42:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CjhqX-0002qv-Cd for grub-devel@gnu.org; Wed, 29 Dec 2004 12:42:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CjhqW-0002qM-AY for grub-devel@gnu.org; Wed, 29 Dec 2004 12:42:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CjhqW-0002pw-5n for grub-devel@gnu.org; Wed, 29 Dec 2004 12:42:52 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cjhdq-0006zC-TP for grub-devel@gnu.org; Wed, 29 Dec 2004 12:29:47 -0500 Received: from vscan-ca.han.nl (mars.han.nl [145.74.129.116]) by mail-cn.han.nl (Postfix) with ESMTP id 2F58A9C35 for ; Wed, 29 Dec 2004 18:28:04 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.51]) by vscan-ca.han.nl (mars.han.nl [145.74.129.116]) (amavisd-new, port 10024) with LMTP id 04581-02-51 for ; Wed, 29 Dec 2004 18:28:01 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 26A958F39 for ; Wed, 29 Dec 2004 18:28:01 +0100 (CET) Received: from marco.marco-g.com (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id C6B85C046 for ; Wed, 29 Dec 2004 18:28:00 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <40595AA3.6000800@ciam.ru> <200409021250.14583.okuji@enbug.org> <87oeklxe1b.fsf@marco.marco-g.com> <200409071246.44891.okuji@enbug.org> From: Marco Gerards Date: Wed, 29 Dec 2004 17:27:23 +0000 In-Reply-To: <200409071246.44891.okuji@enbug.org> (Yoshinori K. Okuji's message of "Tue, 7 Sep 2004 12:46:44 +0200") Message-ID: <87652lj9qc.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-ca.han.nl Subject: Re: GRUB2: *BSD and more patch 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, 29 Dec 2004 17:42:53 -0000 "Yoshinori K. Okuji" writes: > On Sunday 05 September 2004 11:26, Marco Gerards wrote: >> Here it is in the mailinglist archives: >> http://lists.gnu.org/archive/html/grub-devel/2004-03/msg00060.html > > Ah, I see. IIRC, I didn't like the patch, because memalign was not > implemented. I accept the patch, once someone writes memalign. There are, as far as I can see, 3 things we can do: 1) Make grub_memalign return GRUB_ERR_NOT_IMPLEMENTED_YET. grub_memalign is only used by dl.c, which is not important for the utils. When someone adds module loading support to grub-emu, we have to switch to using kern/mm.c anyway. 2) Allocating memory using mmap and managing it with kern/mm.c. That makes it easier to implement module loading. 3) Reserving more memory than required so the alignment can be corrected. And while we are discussing the memory management. I'd like to add an option to grub-emu so the memory manager (mm.c or POSIX) can be chosen. The mm.c memory manager can be useful to debugging mm.c. The POSIX (malloc) memory manager that is available by default will be useful for debugging for memory leaks with tools like valgrind. I would prefer solution #1, until we implement more fancy features (choosing the memory manager and module loading) for grub-emu. And even in that case, I think mm.c should be used in grub-emu only and even then configurable like I described above. Okuji, do you agree with this or do you prefer another solution? Or do you have any other suggestion? It would not be hard to fix this and it is required for FreeBSD. I am willing to work on this. Thanks, Marco