/* Mode: C; Tab-Width: 4.; */
/*                                                                       */
/*                                                                       */
/*                      RESTRICTED RIGHTS LEGEND                         */
/*                                                                       */
/* Use, duplication, or disclosure by the Government is subject to       */
/* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in  */
/* Technical Data and Computer Software clause at 252.227-7013.          */
/*                                                                       */
/*                    TEXAS INSTRUMENTS INCORPORATED.                    */
/*                            P.O. BOX 149149                            */
/*                         AUSTIN, TEXAS 78714-9149                      */
/*                              MS 2151                                  */
/*                                                                       */
/*  Copyright (C) 1987,1988,1989,1990 Texas Instruments Incorporated.    */
/*  All rights reserved.                                                 */
/*                                                                       */
/*
	Memory.h -- Memory Manager

	C Interface to the Macintosh Libraries
	Copyright Apple Computer,Inc. 1985-1987
	All rights reserved.
*/

#ifndef __MEMORY__
#define __MEMORY__
#ifndef __TYPES__
#include <Types.h>
#endif

#define maxSize 0x800000
typedef long Size;
typedef struct Zone {
	Ptr bkLim;
	Ptr purgePtr;
	Ptr hFstFree;
	long zcbFree;
	ProcPtr gzProc;
	short moreMast;
	short flags;
	short cntRel;
	short maxRel;
	short cntNRel;
	short maxNRel;
	short cntEmpty;
	short cntHandles;
	long minCBFree;
	ProcPtr purgeProc;
	Ptr sparePtr;
	Ptr allocPtr;
	short heapData;
} Zone,*THz;
Ptr GetApplLimit();
THz GetZone();
THz SystemZone();
THz ApplicZone();
Handle NewHandle();
THz HandleZone();
Handle RecoverHandle();
pascal Ptr NEWPTR(length)
	    Size length;
     	 extern;
pascal OSErr MemError()
	extern;	
THz PtrZone();
Handle GZSaveHnd();
Ptr TopMem();
pascal long MaxBlock()
	extern;
pascal long StackSpace()
	extern;
Handle NewEmptyHandle();
extern void HLock();
extern void HUnlock();
extern void HPurge();
extern void HNoPurge();

extern Ptr StripAddress();
/* does this belong here?  11.19.87 MBC */
char *malloc(size) ;
	unsigned int	size;
#endif
