Deleted Added
full compact
malloc.h (42962) malloc.h (43301)
1/*
2 * Copyright (c) 1987, 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 * @(#)malloc.h 8.5 (Berkeley) 5/3/95
1/*
2 * Copyright (c) 1987, 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 * @(#)malloc.h 8.5 (Berkeley) 5/3/95
34 * $Id: malloc.h,v 1.39 1999/01/21 08:29:08 dillon Exp $
34 * $Id: malloc.h,v 1.40 1999/01/21 09:23:21 dillon Exp $
35 */
36
37#ifndef _SYS_MALLOC_H_
38#define _SYS_MALLOC_H_
39
40#define splmem splhigh
41
42#define KMEMSTATS

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

157 ? (MINBUCKET + 14) \
158 : (MINBUCKET + 15))
159
160/*
161 * Turn virtual addresses into kmem map indices
162 */
163#define kmemxtob(alloc) (kmembase + (alloc) * PAGE_SIZE)
164#define btokmemx(addr) (((caddr_t)(addr) - kmembase) / PAGE_SIZE)
35 */
36
37#ifndef _SYS_MALLOC_H_
38#define _SYS_MALLOC_H_
39
40#define splmem splhigh
41
42#define KMEMSTATS

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

157 ? (MINBUCKET + 14) \
158 : (MINBUCKET + 15))
159
160/*
161 * Turn virtual addresses into kmem map indices
162 */
163#define kmemxtob(alloc) (kmembase + (alloc) * PAGE_SIZE)
164#define btokmemx(addr) (((caddr_t)(addr) - kmembase) / PAGE_SIZE)
165#define btokup(addr) (&kmemusage[(caddr_t)(addr) - kmembase >> PAGE_SHIFT])
165#define btokup(addr) (&kmemusage[((caddr_t)(addr) - kmembase) >> PAGE_SHIFT])
166
167/*
168 * Macro versions for the usual cases of malloc/free
169 */
170#if defined(KMEMSTATS) || defined(DIAGNOSTIC)
171#define MALLOC(space, cast, size, type, flags) \
172 (space) = (cast)malloc((u_long)(size), type, flags)
173#define FREE(addr, type) free((addr), type)

--- 53 unchanged lines hidden ---
166
167/*
168 * Macro versions for the usual cases of malloc/free
169 */
170#if defined(KMEMSTATS) || defined(DIAGNOSTIC)
171#define MALLOC(space, cast, size, type, flags) \
172 (space) = (cast)malloc((u_long)(size), type, flags)
173#define FREE(addr, type) free((addr), type)

--- 53 unchanged lines hidden ---