kern_malloc.c (56720) | kern_malloc.c (57263) |
---|---|
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 * $FreeBSD: head/sys/kern/kern_malloc.c 56720 2000-01-28 04:04:58Z dg $ | 34 * $FreeBSD: head/sys/kern/kern_malloc.c 57263 2000-02-16 21:11:33Z dillon $ |
35 */ 36 37#include "opt_vm.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> --- 24 unchanged lines hidden (view full) --- 67 68static MALLOC_DEFINE(M_FREE, "free", "should be on free list"); 69 70static struct malloc_type *kmemstatistics; 71static struct kmembuckets bucket[MINBUCKET + 16]; 72static struct kmemusage *kmemusage; 73static char *kmembase; 74static char *kmemlimit; | 35 */ 36 37#include "opt_vm.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/malloc.h> --- 24 unchanged lines hidden (view full) --- 67 68static MALLOC_DEFINE(M_FREE, "free", "should be on free list"); 69 70static struct malloc_type *kmemstatistics; 71static struct kmembuckets bucket[MINBUCKET + 16]; 72static struct kmemusage *kmemusage; 73static char *kmembase; 74static char *kmemlimit; |
75static u_int vm_kmem_size; | |
76 | 75 |
76u_int vm_kmem_size; 77 |
|
77#ifdef INVARIANTS 78/* 79 * This structure provides a set of masks to catch unaligned frees. 80 */ 81static long addrmask[] = { 0, 82 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 83 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 84 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff, --- 447 unchanged lines hidden --- | 78#ifdef INVARIANTS 79/* 80 * This structure provides a set of masks to catch unaligned frees. 81 */ 82static long addrmask[] = { 0, 83 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 84 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 85 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff, --- 447 unchanged lines hidden --- |