Get rid of memory status functions

Unused.
This commit is contained in:
dhewg 2012-01-08 12:20:51 +01:00
parent fe7b32d47e
commit 1ce658e835
4 changed files with 0 additions and 77 deletions

View file

@ -239,23 +239,6 @@ const char *Posix_Cwd( void ) {
return cwd;
}
/*
=================
Sys_GetMemoryStatus
=================
*/
void Sys_GetMemoryStatus( sysMemoryStats_t &stats ) {
common->Printf( "FIXME: Sys_GetMemoryStatus stub\n" );
}
void Sys_GetCurrentMemoryStatus( sysMemoryStats_t &stats ) {
common->Printf( "FIXME: Sys_GetCurrentMemoryStatus\n" );
}
void Sys_GetExeLaunchMemoryStatus( sysMemoryStats_t &stats ) {
common->Printf( "FIXME: Sys_GetExeLaunchMemoryStatus\n" );
}
/*
=================
Sys_Init

View file

@ -176,10 +176,6 @@ int Sys_GetVideoRam( void );
// returns amount of drive space in path
int Sys_GetDriveFreeSpace( const char *path );
// returns memory stats
void Sys_GetCurrentMemoryStatus( sysMemoryStats_t &stats );
void Sys_GetExeLaunchMemoryStatus( sysMemoryStats_t &stats );
// lock and unlock memory
bool Sys_LockMemory( void *ptr, int bytes );
bool Sys_UnlockMemory( void *ptr, int bytes );

View file

@ -58,17 +58,6 @@ idCVar Win32Vars_t::win_viewlog( "win_viewlog", "0", CVAR_SYSTEM | CVAR_INTEGER,
Win32Vars_t win32;
static sysMemoryStats_t exeLaunchMemoryStats;
/*
================
Sys_GetExeLaunchMemoryStatus
================
*/
void Sys_GetExeLaunchMemoryStatus( sysMemoryStats_t &stats ) {
stats = exeLaunchMemoryStats;
}
/*
=============
Sys_Error
@ -532,8 +521,6 @@ int main(int argc, char *argv[]) {
Sys_SetPhysicalWorkMemory( 192 << 20, 1024 << 20 );
Sys_GetCurrentMemoryStatus( exeLaunchMemoryStats );
win32.hInstance = GetModuleHandle(NULL);
// done before Com/Sys_Init since we need this for error output

View file

@ -75,49 +75,6 @@ int Sys_GetDriveFreeSpace( const char *path ) {
return ret;
}
/*
================
Sys_GetCurrentMemoryStatus
returns OS mem info
all values are in kB except the memoryload
================
*/
void Sys_GetCurrentMemoryStatus( sysMemoryStats_t &stats ) {
MEMORYSTATUSEX statex;
unsigned __int64 work;
memset( &statex, 0, sizeof( statex ) );
statex.dwLength = sizeof( statex );
GlobalMemoryStatusEx( &statex );
memset( &stats, 0, sizeof( stats ) );
stats.memoryLoad = statex.dwMemoryLoad;
work = statex.ullTotalPhys >> 20;
stats.totalPhysical = *(int*)&work;
work = statex.ullAvailPhys >> 20;
stats.availPhysical = *(int*)&work;
work = statex.ullAvailPageFile >> 20;
stats.availPageFile = *(int*)&work;
work = statex.ullTotalPageFile >> 20;
stats.totalPageFile = *(int*)&work;
work = statex.ullTotalVirtual >> 20;
stats.totalVirtual = *(int*)&work;
work = statex.ullAvailVirtual >> 20;
stats.availVirtual = *(int*)&work;
work = statex.ullAvailExtendedVirtual >> 20;
stats.availExtendedVirtual = *(int*)&work;
}
/*
================
Sys_LockMemory