init_main.c (4649e92b4ee608132257197e2a7783d7778fc7b1) init_main.c (222d01951f8677015e3e96c6950e809c0d983c09)
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

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

462 p->p_limit = lim_alloc();
463 for (i = 0; i < RLIM_NLIMITS; i++)
464 p->p_limit->pl_rlimit[i].rlim_cur =
465 p->p_limit->pl_rlimit[i].rlim_max = RLIM_INFINITY;
466 p->p_limit->pl_rlimit[RLIMIT_NOFILE].rlim_cur =
467 p->p_limit->pl_rlimit[RLIMIT_NOFILE].rlim_max = maxfiles;
468 p->p_limit->pl_rlimit[RLIMIT_NPROC].rlim_cur =
469 p->p_limit->pl_rlimit[RLIMIT_NPROC].rlim_max = maxproc;
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

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

462 p->p_limit = lim_alloc();
463 for (i = 0; i < RLIM_NLIMITS; i++)
464 p->p_limit->pl_rlimit[i].rlim_cur =
465 p->p_limit->pl_rlimit[i].rlim_max = RLIM_INFINITY;
466 p->p_limit->pl_rlimit[RLIMIT_NOFILE].rlim_cur =
467 p->p_limit->pl_rlimit[RLIMIT_NOFILE].rlim_max = maxfiles;
468 p->p_limit->pl_rlimit[RLIMIT_NPROC].rlim_cur =
469 p->p_limit->pl_rlimit[RLIMIT_NPROC].rlim_max = maxproc;
470 i = ptoa(cnt.v_free_count);
470 i = ptoa(VMCNT_GET(free_count));
471 p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_max = i;
472 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_max = i;
473 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = i / 3;
474 p->p_cpulimit = RLIM_INFINITY;
475
476 p->p_stats = pstats_alloc();
477
478 /* Allocate a prototype map so we have something to fork. */

--- 258 unchanged lines hidden ---
471 p->p_limit->pl_rlimit[RLIMIT_RSS].rlim_max = i;
472 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_max = i;
473 p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_cur = i / 3;
474 p->p_cpulimit = RLIM_INFINITY;
475
476 p->p_stats = pstats_alloc();
477
478 /* Allocate a prototype map so we have something to fork. */

--- 258 unchanged lines hidden ---