X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/43866e378188c25dd1e2208016ab3cbeb086ae6c..55e303ae13a4cf49d70f2294092726f2fffb9ef2:/osfmk/vm/vm_init.c diff --git a/osfmk/vm/vm_init.c b/osfmk/vm/vm_init.c index 37e0e6a75..26bd959e5 100644 --- a/osfmk/vm/vm_init.c +++ b/osfmk/vm/vm_init.c @@ -106,8 +106,9 @@ vm_mem_bootstrap(void) if (PE_parse_boot_arg("zsize", &zsize)) zsize = zsize * 1024 * 1024; else { - zsize = mem_size >> 2; /* Get target zone size as 1/4 of physical memory */ + zsize = sane_size >> 2; /* Get target zone size as 1/4 of physical memory */ } + if(zsize < ZONE_MAP_MIN) zsize = ZONE_MAP_MIN; /* Clamp to min */ if(zsize > ZONE_MAP_MAX) zsize = ZONE_MAP_MAX; /* Clamp to max */ zone_init(zsize); /* Allocate address space for zones */