Deleted Added
full compact
kern_malloc.c (10358) kern_malloc.c (10653)
1/*
2 * Copyright (c) 1987, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1987, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94
34 * $Id: kern_malloc.c,v 1.12 1995/05/30 08:05:33 rgrimes Exp $
34 * $Id: kern_malloc.c,v 1.13 1995/08/28 09:18:44 julian Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/proc.h>
40#include <sys/kernel.h>
41#include <sys/malloc.h>
42
43#include <vm/vm.h>
44#include <vm/vm_kern.h>
45
46/*
47 * System initialization
48 */
49
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/proc.h>
40#include <sys/kernel.h>
41#include <sys/malloc.h>
42
43#include <vm/vm.h>
44#include <vm/vm_kern.h>
45
46/*
47 * System initialization
48 */
49
50static void kmeminit __P((caddr_t));
50static void kmeminit __P((void *));
51SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL)
52
53
54struct kmembuckets bucket[MINBUCKET + 16];
55struct kmemstats kmemstats[M_LAST];
56struct kmemusage *kmemusage;
57char *kmembase, *kmemlimit;
58char *memname[] = INITKMEMNAMES;

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

361 splx(s);
362}
363
364/*
365 * Initialize the kernel memory allocator
366 */
367/* ARGSUSED*/
368static void
51SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL)
52
53
54struct kmembuckets bucket[MINBUCKET + 16];
55struct kmemstats kmemstats[M_LAST];
56struct kmemusage *kmemusage;
57char *kmembase, *kmemlimit;
58char *memname[] = INITKMEMNAMES;

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

361 splx(s);
362}
363
364/*
365 * Initialize the kernel memory allocator
366 */
367/* ARGSUSED*/
368static void
369kmeminit( udata)
370caddr_t udata; /* not used*/
369kmeminit(udata)
370 void *udata; /* not used*/
371{
372 register long indx;
373 int npg;
374
375#if ((MAXALLOCSAVE & (MAXALLOCSAVE - 1)) != 0)
376 ERROR!_kmeminit:_MAXALLOCSAVE_not_power_of_2
377#endif
378#if (MAXALLOCSAVE > MINALLOCSIZE * 32768)

--- 25 unchanged lines hidden ---
371{
372 register long indx;
373 int npg;
374
375#if ((MAXALLOCSAVE & (MAXALLOCSAVE - 1)) != 0)
376 ERROR!_kmeminit:_MAXALLOCSAVE_not_power_of_2
377#endif
378#if (MAXALLOCSAVE > MINALLOCSIZE * 32768)

--- 25 unchanged lines hidden ---