tidies some things up and removes SOE memory manager overriding

This commit is contained in:
DarthArgus
2016-11-28 17:07:49 +00:00
parent 1867ee7cc9
commit 89cd10fbcc
24 changed files with 39 additions and 83 deletions
@@ -71,7 +71,7 @@ char *SetupSharedXmlNamespace::xmlDuplicateString(char const *source)
void *SetupSharedXmlNamespace::xmlReAllocate(void *memory, size_t byteCount)
{
return MemoryManager::reallocate(memory, byteCount);
return realloc(memory, byteCount);
}
// ======================================================================
@@ -116,18 +116,9 @@ XmlTreeDocument const *XmlTreeDocumentList::fetch(CrcString const &filename)
delete file;
//-- Create an XML DOM tree out of it.
#ifdef _DEBUG
unsigned long const preDomBytesAllocated = MemoryManager::getCurrentNumberOfBytesAllocated();
#endif
xmlDocPtr const xmlDocument = xmlParseMemory(reinterpret_cast<char const *>(fileContents), fileSize);
FATAL(!xmlDocument, ("xmlParseMemory() returned nullptr when parsing contents of file [%s].", cPathName));
#ifdef _DEBUG
unsigned long const postDomBytesAllocated = MemoryManager::getCurrentNumberOfBytesAllocated();
DEBUG_REPORT_LOG(s_logXmlDomTreeSize, ("XmlTreeDocumentList: XML tree file [%s]: XML DOM tree appears to have consumed [%d] bytes.\n", cPathName, static_cast<int>(postDomBytesAllocated - preDomBytesAllocated)));
#endif
// Release initial file contents buffer.
delete [] fileContents;