on 04/04/2013 20:16 John Baldwin said the following:
> On Thursday, April 04, 2013 12:16:32 pm Andriy Gapon wrote:
>> diff --git a/sys/boot/i386/zfsboot/zfsboot.c 
> b/sys/boot/i386/zfsboot/zfsboot.c
>> index 82402b6..12ceeb0 100644
>> --- a/sys/boot/i386/zfsboot/zfsboot.c
>> +++ b/sys/boot/i386/zfsboot/zfsboot.c
>> @@ -374,6 +374,16 @@ bios_getmem(void)
>>      }
>>
>>      /*
>> +     * If extended memory is at least twice as large as the largest
>> +     * region of higher memory, then carve the high heap out of
>> +     * extended memory.
>> +     */
>> +    if (bios_extmem > 2 * high_heap_size) {
>> +    high_heap_base = 0x100000 + bios_extmem / 2;
>> +    high_heap_size = bios_extmem / 2;
>> +    }
>> +
>> +    /*
>>       * If we have extended memory and did not find a suitable heap
>>       * region in the SMAP, use the last 3MB of 'extended' memory as a
>>       * high heap candidate.
>>
> 
> We should really use the same algorithm in boot2 and gptboot as well.

Yes, this is just something to start with.

BTW, all other components use bios_getmem from sys/boot/i386/libi386/biosmem.c ?

> I think though that in this case you can just use the last 3MB of heap
> rather than half of the extended memory as heap.

I thought the more the better? :-)
I've kept the block of code that tries to make high_heap_size at least 3MB.

-- 
Andriy Gapon
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to