1 line
1.0 KiB
C
1 line
1.0 KiB
C
/*********************************************************/
|
|
/* This source code copyright (c) 1991-2001, Aaron Giles */
|
|
/* See the Read Me file for licensing information. */
|
|
/* Contact email: mac@aarongiles.com */
|
|
/*********************************************************/
|
|
|
|
#ifndef __MEMORYUTILS__
|
|
#define __MEMORYUTILS__
|
|
|
|
CGrafPtr AllocatePort(void);
|
|
void DeallocatePort(CGrafPtr thePort);
|
|
Handle CheckedNewHandle(Size theSize, Boolean canForce);
|
|
Handle AnyNewHandle(Size theSize);
|
|
void ClearMem(Ptr thePtr, register Size theSize);
|
|
long GWorldSize(GWorldPtr theGWorld);
|
|
long EstGWorldSize(Rect *bounds, short depth);
|
|
Boolean IsMemAvailable(long request);
|
|
Boolean MakeMemAvailable(long request);
|
|
long GetMem(void);
|
|
pascal long GrowZone(Size cbNeeded);
|
|
#define AllocateWindow() (WindowPtr)AllocatePort()
|
|
#define DeallocateWindow(theWindow) DeallocatePort((CGrafPtr)theWindow)
|
|
#define AllocateDialog() (DialogPtr)AllocatePort()
|
|
#define DeallocateDialog(theDialog) DeallocatePort((CGrafPtr)theDialog)
|
|
|
|
#endif
|