mallint.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1996-2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
#ifndef _REENTRANT
#define _REENTRANT
#endif
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <memory.h>
#include <thread.h>
#include <synch.h>
#include <malloc.h>
#include <procfs.h>
#include <limits.h>
/* debugging macros */
#ifdef DEBUG
#define COUNT(n) ((void) n++)
#else
#define ASSERT(p) ((void)0)
#define COUNT(n) ((void)0)
#endif /* DEBUG */
/* for conveniences */
#ifndef NULL
#define NULL (0)
#endif
/*
* All of our allocations will be aligned on the least multiple of 4,
* at least, so the two low order bits are guaranteed to be available.
*/
#ifdef _LP64
#define ALIGN 16
#else
#define ALIGN 8
#endif
/* the proto-word; size must be ALIGN bytes */
typedef union _w_ {
} WORD;
/* structure of a node in the free tree */
typedef struct _t_ {
} TREE;
/* usable # of bytes in the block */
/* free tree pointers */
/* forward link in lists of small blocks */
/* forward and backward links for lists in the tree */
/* functions to get information on a block */
/* functions to set and test the lowest two bits of a word */
/* system call to get more memory */
#define ERRCORE ((char *)(-1))
/* where are these *really* declared? */