Deleted Added
full compact
kern_malloc.c (67384) kern_malloc.c (70861)
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 67384 2000-10-20 17:54:55Z phk $
34 * $FreeBSD: head/sys/kern/kern_malloc.c 70861 2001-01-10 04:43:51Z jake $
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>

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

142 long *end, *lp;
143 int copysize;
144 const char *savedtype;
145#endif
146 register struct malloc_type *ksp = type;
147
148#if defined(INVARIANTS) && defined(__i386__)
149 if (flags == M_WAITOK)
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>

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

142 long *end, *lp;
143 int copysize;
144 const char *savedtype;
145#endif
146 register struct malloc_type *ksp = type;
147
148#if defined(INVARIANTS) && defined(__i386__)
149 if (flags == M_WAITOK)
150 KASSERT(intr_nesting_level == 0,
150 KASSERT(PCPU_GET(intr_nesting_level) == 0,
151 ("malloc(M_WAITOK) in interrupt context"));
152#endif
153 indx = BUCKETINDX(size);
154 kbp = &bucket[indx];
155 s = splmem();
156 mtx_enter(&malloc_mtx, MTX_DEF);
157 while (ksp->ks_memuse >= ksp->ks_limit) {
158 if (flags & M_ASLEEP) {

--- 418 unchanged lines hidden ---
151 ("malloc(M_WAITOK) in interrupt context"));
152#endif
153 indx = BUCKETINDX(size);
154 kbp = &bucket[indx];
155 s = splmem();
156 mtx_enter(&malloc_mtx, MTX_DEF);
157 while (ksp->ks_memuse >= ksp->ks_limit) {
158 if (flags & M_ASLEEP) {

--- 418 unchanged lines hidden ---