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." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel