10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _UMEM_H
28 #define _UMEM_H
29
30 #pragma ident "%Z%%M% %I% %E% SMI"
31
32 #include <sys/types.h>
33 #include <sys/vmem.h>
34 #include <stdlib.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #define UMEM_DEFAULT 0x0000 /* normal -- may fail */
41 #define UMEM_NOFAIL 0x0100 /* Never fails -- may call exit(2) */
42
43 #define UMEM_FLAGS 0xffff /* all settable umem flags */
44
45 extern void *umem_alloc(size_t, int);
46 extern void *umem_alloc_align(size_t, size_t, int);
47 extern void *umem_zalloc(size_t, int);
48 extern void umem_free(void *, size_t);
49 extern void umem_free_align(void *, size_t);
50
51 /*
|
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #ifndef _UMEM_H
28 #define _UMEM_H
29
30 #include <sys/types.h>
31 #include <sys/vmem.h>
32 #include <stdlib.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #define UMEM_DEFAULT 0x0000 /* normal -- may fail */
39 #define UMEM_NOFAIL 0x0100 /* Never fails -- may call exit(2) */
40
41 #define UMEM_FLAGS 0xffff /* all settable umem flags */
42
43 extern void *umem_alloc(size_t, int);
44 extern void *umem_alloc_align(size_t, size_t, int);
45 extern void *umem_zalloc(size_t, int);
46 extern void umem_free(void *, size_t);
47 extern void umem_free_align(void *, size_t);
48
49 /*
|