/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
#include <sys/isa_defs.h>
#include <stdlib.h>
#include <memory.h>
#include <thread.h>
#include <synch.h>
#include <mtlib.h>
#include <errno.h>
#include <string.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 */
/* function to copy data from one area to another */
/* for conveniences */
#ifndef NULL
#define NULL (0)
#endif
#ifdef DEBUG32
/*
* The following definitions ease debugging
* on a machine in which sizeof(pointer) == sizeof(int) == 4.
* These definitions are not portable.
*
*/
typedef int WORD;
typedef struct _t_ {
} TREE;
#else /* !DEBUG32 */
/*
* 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
#else
#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 */
#endif /* DEBUG32 */
/* functions to get information on a block */
/* functions to set and test the lowest two bits of a word */
/* system call to get more core */
extern void _free_unlocked(void *);
extern mutex_t libc_malloc_lock;