disable the memory manager entirely! - server scripts may load _slightly_ slower at least, visibly, but we don't crash this way

This commit is contained in:
DarthArgus
2016-02-26 09:54:55 -06:00
parent 1c1cf54a7b
commit 4093f2d0f4
3 changed files with 2 additions and 30 deletions
@@ -74,7 +74,7 @@ void ConfigServerDatabase::install(void)
KEY_BOOL (enableLoadLocks, true);
KEY_INT (databaseReconnectTime, 0);
KEY_BOOL (logChunkLoading,false);
KEY_BOOL (useMemoryManagerForOCI,true);
KEY_BOOL (useMemoryManagerForOCI,false);
KEY_INT (maxCharactersPerLoadRequest,10);
KEY_INT (maxChunksPerLoadRequest,200);
KEY_FLOAT (maxLoadStartDelay,300.0f);
@@ -439,34 +439,6 @@ bool ConsoleCommandParserServer::performParsing (const NetworkId & userId, const
}
result += Unicode::narrowToWide(pid.getValueString());
}
//-----------------------------------------------------------------
else if (isAbbrev( argv[0], "memUsage"))
{
char text[256];
sprintf(text, "Bytes: %lu Allocations: %d\n", MemoryManager::getCurrentNumberOfBytesAllocated(), MemoryManager::getCurrentNumberOfAllocations());
result += Unicode::narrowToWide(text);
result += getErrorMessage (argv[0], ERR_SUCCESS);
}
//-----------------------------------------------------------------
else if (isAbbrev( argv[0], "memoryReport"))
{
MemoryManager::report();
result += getErrorMessage (argv[0], ERR_SUCCESS);
}
//-----------------------------------------------------------------
else if (isAbbrev( argv[0], "dumpMemToFile"))
{
std::string fileName(Unicode::wideToNarrow(argv[1]));
std::string leakStr(Unicode::wideToNarrow(argv[2]));
bool leak = (leakStr == "true" || leakStr == "1");
MemoryManager::reportToFile(fileName.c_str(), leak);
result += getErrorMessage (argv[0], ERR_SUCCESS);
}
//-----------------------------------------------------------------
else if (isAbbrev( argv[0], "clock"))
@@ -36,7 +36,7 @@
// the below seems to bare minimum cause the DB process to segfault
// too bad, if we weren't using an omnibus mem manager we could potentially maximize usage
#define DISABLE_MEMORY_MANAGER 0
#define DISABLE_MEMORY_MANAGER 1
//lint -e826 // Suspicious pointer-to-pointer conversion (area too small)