kboot: Trim initial allocation to 64MB

We only need 64MB to read off ZFS pools. Since Linux doesn't do
ovecommit by default, the extra 64MB is 64MB less we can allocate for
things like RAM disks.

Sponsored by:		Netflix
Reviewed by:		kevans, andrew
Differential Revision:	https://reviews.freebsd.org/D38268
This commit is contained in:
Warner Losh 2023-02-02 13:03:28 -07:00
parent ce18e19394
commit 9fb276ea80

View file

@ -151,7 +151,7 @@ int
main(int argc, const char **argv)
{
void *heapbase;
const size_t heapsize = 128*1024*1024;
const size_t heapsize = 64*1024*1024;
const char *bootdev;
archsw.arch_getdev = kboot_getdev;
@ -167,7 +167,7 @@ main(int argc, const char **argv)
do_init();
/*
* Setup the heap 15MB should be plenty
* Setup the heap, 64MB is minimum for ZFS booting
*/
heapbase = host_getmem(heapsize);
setheap(heapbase, heapbase + heapsize);