kern_malloc.c (9b4fcf851a73554063d4a2de9a4f10cd23a0a4f6) | kern_malloc.c (e9a3f7852d754fe0af27fae7e7215ca9db8d328f) |
---|---|
1/*- 2 * Copyright (c) 1987, 1991, 1993 3 * The Regents of the University of California. 4 * Copyright (c) 2005-2009 Robert N. M. Watson 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 695 unchanged lines hidden (view full) --- 704 * Limit kmem virtual size to twice the physical memory. 705 * This allows for kmem map sparseness, but limits the size 706 * to something sane. Be careful to not overflow the 32bit 707 * ints while doing the check. 708 */ 709 if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count) 710 vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE; 711 | 1/*- 2 * Copyright (c) 1987, 1991, 1993 3 * The Regents of the University of California. 4 * Copyright (c) 2005-2009 Robert N. M. Watson 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 695 unchanged lines hidden (view full) --- 704 * Limit kmem virtual size to twice the physical memory. 705 * This allows for kmem map sparseness, but limits the size 706 * to something sane. Be careful to not overflow the 32bit 707 * ints while doing the check. 708 */ 709 if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count) 710 vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE; 711 |
712 /* 713 * Tune settings based on the kmem map's size at this time. 714 */ 715 init_param3(vm_kmem_size / PAGE_SIZE); 716 | |
717#ifdef DEBUG_MEMGUARD 718 tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max); 719#else 720 tmp = vm_kmem_size; 721#endif 722 kmem_map = kmem_suballoc(kernel_map, &kmembase, &kmemlimit, 723 tmp, TRUE); 724 kmem_map->system_map = 1; --- 329 unchanged lines hidden --- | 712#ifdef DEBUG_MEMGUARD 713 tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max); 714#else 715 tmp = vm_kmem_size; 716#endif 717 kmem_map = kmem_suballoc(kernel_map, &kmembase, &kmemlimit, 718 tmp, TRUE); 719 kmem_map->system_map = 1; --- 329 unchanged lines hidden --- |