Skip to content

Commit

Permalink
Removed unused functoin Hunk_Trash.
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Dec 8, 2011
1 parent a5c88d0 commit 2fbf9d9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
40 changes: 0 additions & 40 deletions code/qcommon/common.c
Expand Up @@ -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;
}
}
}

/*
===================================================================
Expand Down
1 change: 0 additions & 1 deletion code/qcommon/qcommon.h
Expand Up @@ -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 );

Expand Down

0 comments on commit 2fbf9d9

Please sign in to comment.