예제 #1
0
파일: memcop.cpp 프로젝트: hgl888/nashtest
BOOL TempMemSeemsLow(Size size)
{
	BOOL seemsLow = TempFreeMem() < kTempMemSafetyMargin + size;

	if (seemsLow)
	{
		// Force a heap compaction, and look again.
		Size ignored = 0;
		TempMaxMem(&ignored);
		
		seemsLow = TempFreeMem() < kTempMemSafetyMargin + size;
	}

	return seemsLow;
}
예제 #2
0
pascal void main (XCmdPtr paramPtr) {
	
	/*
	This XFCN returns the size of the largest block of system memory 
	that's free. 
	
	It should be the same number that's displayed as the "Largest 
	Unused Block" by the Finder's "About this Macintosh" command.
	*/
	
	Str255 s;
	long growBytes;
		
	NumToString (TempMaxMem (&growBytes), s);
	
	paramPtr->returnValue = PasToZero (paramPtr, s);
	} /*main*/