malloc.h (184205) | malloc.h (184210) |
---|---|
1/*- 2 * Copyright (c) 1987, 1993 3 * The Regents of the University of California. 4 * Copyright (c) 2005 Robert N. M. Watson 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * 31 * @(#)malloc.h 8.5 (Berkeley) 5/3/95 | 1/*- 2 * Copyright (c) 1987, 1993 3 * The Regents of the University of California. 4 * Copyright (c) 2005 Robert N. M. Watson 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 15 unchanged lines hidden (view full) --- 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * 31 * @(#)malloc.h 8.5 (Berkeley) 5/3/95 |
32 * $FreeBSD: head/sys/sys/malloc.h 184205 2008-10-23 15:53:51Z des $ | 32 * $FreeBSD: head/sys/sys/malloc.h 184210 2008-10-23 19:57:13Z des $ |
33 */ 34 35#ifndef _SYS_MALLOC_H_ 36#define _SYS_MALLOC_H_ 37 38#include <sys/param.h> 39#include <sys/queue.h> 40#include <sys/_lock.h> --- 121 unchanged lines hidden (view full) --- 162MALLOC_DECLARE(M_CACHE); 163MALLOC_DECLARE(M_DEVBUF); 164MALLOC_DECLARE(M_TEMP); 165 166MALLOC_DECLARE(M_IP6OPT); /* for INET6 */ 167MALLOC_DECLARE(M_IP6NDP); /* for INET6 */ 168 169/* | 33 */ 34 35#ifndef _SYS_MALLOC_H_ 36#define _SYS_MALLOC_H_ 37 38#include <sys/param.h> 39#include <sys/queue.h> 40#include <sys/_lock.h> --- 121 unchanged lines hidden (view full) --- 162MALLOC_DECLARE(M_CACHE); 163MALLOC_DECLARE(M_DEVBUF); 164MALLOC_DECLARE(M_TEMP); 165 166MALLOC_DECLARE(M_IP6OPT); /* for INET6 */ 167MALLOC_DECLARE(M_IP6NDP); /* for INET6 */ 168 169/* |
170 * Deprecated macro versions of not-quite-malloc() and free(). 171 */ 172#define MALLOC(space, cast, size, type, flags) \ 173 ((space) = (cast)malloc((u_long)(size), (type), (flags))) 174#define FREE(addr, type) free((addr), (type)) 175 176/* |
|
170 * XXX this should be declared in <sys/uio.h>, but that tends to fail 171 * because <sys/uio.h> is included in a header before the source file 172 * has a chance to include <sys/malloc.h> to get MALLOC_DECLARE() defined. 173 */ 174MALLOC_DECLARE(M_IOV); 175 176extern struct mtx malloc_mtx; 177 --- 26 unchanged lines hidden --- | 177 * XXX this should be declared in <sys/uio.h>, but that tends to fail 178 * because <sys/uio.h> is included in a header before the source file 179 * has a chance to include <sys/malloc.h> to get MALLOC_DECLARE() defined. 180 */ 181MALLOC_DECLARE(M_IOV); 182 183extern struct mtx malloc_mtx; 184 --- 26 unchanged lines hidden --- |