Deleted Added
full compact
init_main.c (219405) init_main.c (220137)
1/*-
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

--- 28 unchanged lines hidden (view full) ---

37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)init_main.c 8.9 (Berkeley) 1/21/94
42 */
43
44#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

--- 28 unchanged lines hidden (view full) ---

37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)init_main.c 8.9 (Berkeley) 1/21/94
42 */
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/kern/init_main.c 219405 2011-03-08 19:01:45Z dchagin $");
45__FBSDID("$FreeBSD: head/sys/kern/init_main.c 220137 2011-03-29 17:47:25Z trasz $");
46
47#include "opt_ddb.h"
48#include "opt_init_path.h"
49
50#include <sys/param.h>
51#include <sys/kernel.h>
52#include <sys/exec.h>
53#include <sys/file.h>
54#include <sys/filedesc.h>
55#include <sys/jail.h>
56#include <sys/ktr.h>
57#include <sys/lock.h>
58#include <sys/loginclass.h>
59#include <sys/mount.h>
60#include <sys/mutex.h>
61#include <sys/syscallsubr.h>
62#include <sys/sysctl.h>
63#include <sys/proc.h>
46
47#include "opt_ddb.h"
48#include "opt_init_path.h"
49
50#include <sys/param.h>
51#include <sys/kernel.h>
52#include <sys/exec.h>
53#include <sys/file.h>
54#include <sys/filedesc.h>
55#include <sys/jail.h>
56#include <sys/ktr.h>
57#include <sys/lock.h>
58#include <sys/loginclass.h>
59#include <sys/mount.h>
60#include <sys/mutex.h>
61#include <sys/syscallsubr.h>
62#include <sys/sysctl.h>
63#include <sys/proc.h>
64#include <sys/racct.h>
64#include <sys/resourcevar.h>
65#include <sys/systm.h>
66#include <sys/signalvar.h>
67#include <sys/vnode.h>
68#include <sys/sysent.h>
69#include <sys/reboot.h>
70#include <sys/sched.h>
71#include <sys/sx.h>

--- 449 unchanged lines hidden (view full) ---

521 /* Cast to avoid overflow on i386/PAE. */
522 pageablemem = ptoa((vm_paddr_t)cnt.v_free_count);
523 p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_cur =
524 p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_max = pageablemem;
525 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = pageablemem / 3;
526 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_max = pageablemem;
527 p->p_cpulimit = RLIM_INFINITY;
528
65#include <sys/resourcevar.h>
66#include <sys/systm.h>
67#include <sys/signalvar.h>
68#include <sys/vnode.h>
69#include <sys/sysent.h>
70#include <sys/reboot.h>
71#include <sys/sched.h>
72#include <sys/sx.h>

--- 449 unchanged lines hidden (view full) ---

522 /* Cast to avoid overflow on i386/PAE. */
523 pageablemem = ptoa((vm_paddr_t)cnt.v_free_count);
524 p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_cur =
525 p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_max = pageablemem;
526 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = pageablemem / 3;
527 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_max = pageablemem;
528 p->p_cpulimit = RLIM_INFINITY;
529
530 /* Initialize resource accounting structures. */
531 racct_create(&p->p_racct);
532
529 p->p_stats = pstats_alloc();
530
531 /* Allocate a prototype map so we have something to fork. */
532 pmap_pinit0(vmspace_pmap(&vmspace0));
533 p->p_vmspace = &vmspace0;
534 vmspace0.vm_refcnt = 1;
535
536 /*

--- 288 unchanged lines hidden ---
533 p->p_stats = pstats_alloc();
534
535 /* Allocate a prototype map so we have something to fork. */
536 pmap_pinit0(vmspace_pmap(&vmspace0));
537 p->p_vmspace = &vmspace0;
538 vmspace0.vm_refcnt = 1;
539
540 /*

--- 288 unchanged lines hidden ---