/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1991 by John E. Lloyd.				    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#ifndef _FIRSTALLOC_H_
#define _FIRSTALLOC_H_

/*---------------------------------------------------------------------------
 *
 * DESCRIPTION:	Definitions for the circular first-fit allocator
 *		"buddyAlloc".
 * 
 * AUTHOR/DATE:	Taken from old Berkeley 4.1, by
 *		John Lloyd, October 3, 1989
 *
 * MODIFICATION HISTORY:
 *
 *--------------------------------------------------------------------------*/

#include "../h/cdefs.h"
#include "../h/assignMem.h"	/* to get definition of ALIGN */

#define NALIGN	1

union store { 
	union store *ptr;
  	ALIGN dummy[NALIGN];
};

typedef struct {
	union store allocs[2];	/* initial arena */
	union store *allocp;	/* search ptr */
	union store *alloct;	/* arena top */
	union store *allocx;	/* for benefit of realloc (not used here) */
	void *(*morecore)();	/* Routine to get more memory */
	int morecoreBlkSize;	/* minimum block size for morecore */
	void *pool;		/* initial memory pool */
	int poolsize;		/* size of initial memory pool */
	  } FIRST_ALLOC_DESC;

extern void *firstAlloc();

#endif
