From 2fbf9d900642e2c757f9f5416d127cc70333a67d Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 8 Dec 2011 22:54:45 +0000 Subject: [PATCH] Removed unused functoin Hunk_Trash. --- code/qcommon/common.c | 40 ---------------------------------------- code/qcommon/qcommon.h | 1 - 2 files changed, 41 deletions(-) diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 6074b33d..7f79047a 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -1876,46 +1876,6 @@ void Hunk_ClearTempMemory( void ) { } } -/* -================= -Hunk_Trash -================= -*/ -void Hunk_Trash( void ) { - int length, i, rnd; - char *buf, value; - - return; - - if ( s_hunkData == NULL ) - return; - -#ifdef _DEBUG - Com_Error(ERR_DROP, "hunk trashed"); - return; -#endif - - Cvar_Set("com_jp", "1"); - Hunk_SwapBanks(); - - if ( hunk_permanent == &hunk_low ) { - buf = (void *)(s_hunkData + hunk_permanent->permanent); - } else { - buf = (void *)(s_hunkData + s_hunkTotal - hunk_permanent->permanent ); - } - length = hunk_permanent->permanent; - - if (length > 0x7FFFF) { - //randomly trash data within buf - rnd = random() * (length - 0x7FFFF); - value = 31; - for (i = 0; i < 0x7FFFF; i++) { - value *= 109; - buf[rnd+i] ^= value; - } - } -} - /* =================================================================== diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index 052e5026..938b46f1 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -949,7 +949,6 @@ void *Hunk_AllocateTempMemory( int size ); void Hunk_FreeTempMemory( void *buf ); int Hunk_MemoryRemaining( void ); void Hunk_Log( void); -void Hunk_Trash( void ); void Com_TouchMemory( void );