diff options
| author | Brian McGroarty <soft@lindenlab.com> | 2008-07-23 17:23:22 +0000 | 
|---|---|---|
| committer | Brian McGroarty <soft@lindenlab.com> | 2008-07-23 17:23:22 +0000 | 
| commit | bc39ad916e8f23ffae12184eee675aa7c1be2ca9 (patch) | |
| tree | 4470470b07f40a68f18711ebf22bd9406d1428cf /indra | |
| parent | 35b4a91129bc3da3476e7f9d8d8eb923a621cc3e (diff) | |
DEV-18283 Remove nonsense mem-checking debug code
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 45 | 
1 files changed, 0 insertions, 45 deletions
| diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 64188256db..76d5bcec34 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -322,48 +322,6 @@ void idle_afk_check()  	}  } -//this function checks if the system can allocate (num_chunk)MB memory successfully. -//if this check fails, the allocated memory is NOT freed. -void idle_mem_check(S32 num_chunk) -{ -	//this flag signals if memory allocation check is necessary -	static BOOL check = TRUE ; - -	if(!check) //if memory check fails before, do not repeat it. -	{ -		return ; -	} -	check = FALSE ; //before memory check for this frame, turn off check signal for the next frame.  - -	S32 i = 0 ; -	char**p = new char*[num_chunk] ; -	if(!p) -	{ -		return ; -	} -	for(i = 0 ; i < num_chunk ; i++) -	{ -		//1MB per chunk -		//if the allocation fails, the system should catch it. -		p[i] = new char[1024 * 1024] ; - -		if(!p[i]) //in case that system try-catch is turned off -		{ -			return ; -		} -	} - -	//release memory if the allocation check does not fail. -	for(i = 0 ; i < num_chunk ; i++) -	{ -		delete[] p[i] ;	 -	} -	delete[] p ; - -	//memory check for this frame succeeds, turn on next frame check. -	check = TRUE ; -} -  // A callback set in LLAppViewer::init()  static void ui_audio_callback(const LLUUID& uuid)  { @@ -943,9 +901,6 @@ bool LLAppViewer::mainLoop()  			}  #endif -			//at the beginning of every frame, check if the system can successfully allocate 10 * 1 MB memory. -			idle_mem_check(10) ; -  			if (!LLApp::isExiting())  			{  				pingMainloopTimeout("Main:JoystickKeyboard"); | 
