mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
build fixes missed by copy over
This commit is contained in:
parent
8c812cb448
commit
8f856dd7cd
4 changed files with 22 additions and 8 deletions
|
|
@ -3536,15 +3536,13 @@ DefineEngineMethod( SimObject, getDebugInfo, ArrayObject*, (),,
|
||||||
array->push_back( "Flag|CanSave", object->getCanSave() ? "true" : "false" );
|
array->push_back( "Flag|CanSave", object->getCanSave() ? "true" : "false" );
|
||||||
|
|
||||||
#ifndef TORQUE_DISABLE_MEMORY_MANAGER
|
#ifndef TORQUE_DISABLE_MEMORY_MANAGER
|
||||||
Memory::Info memInfo;
|
Memory::MemInfo memInfo;
|
||||||
Memory::getMemoryInfo( object, memInfo );
|
Memory::getMemoryInfo( object, memInfo );
|
||||||
|
|
||||||
array->push_back( "Memory|AllocNumber", String::ToString( memInfo.mAllocNumber ) );
|
array->push_back( "Memory|AllocNumber", String::ToString( memInfo.allocId) );
|
||||||
array->push_back( "Memory|AllocSize", String::ToString( memInfo.mAllocSize ) );
|
array->push_back( "Memory|AllocSize", String::ToString( (U32)memInfo.size) );
|
||||||
array->push_back( "Memory|AllocFile", memInfo.mFileName );
|
array->push_back( "Memory|AllocFile", memInfo.file);
|
||||||
array->push_back( "Memory|AllocLine", String::ToString( memInfo.mLineNumber ) );
|
array->push_back( "Memory|AllocLine", String::ToString( memInfo.line) );
|
||||||
array->push_back( "Memory|IsGlobal", memInfo.mIsGlobal ? "true" : "false" );
|
|
||||||
array->push_back( "Memory|IsStatic", memInfo.mIsStatic ? "true" : "false" );
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,21 @@ namespace Memory
|
||||||
std::free(ptr);
|
std::free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getMemoryInfo(void* ptr, MemInfo& info)
|
||||||
|
{
|
||||||
|
if (!ptr || !initialized)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (U32 i = 0; i < allocCount; ++i)
|
||||||
|
{
|
||||||
|
if (allocList[i].ptr == ptr)
|
||||||
|
{
|
||||||
|
info = allocList[i];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void* realloc(void* oldPtr, dsize_t newSize, const char* fileName, U32 line)
|
static void* realloc(void* oldPtr, dsize_t newSize, const char* fileName, U32 line)
|
||||||
{
|
{
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ namespace Memory
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void shutdown();
|
void shutdown();
|
||||||
|
void getMemoryInfo(void* ptr, MemInfo& info);
|
||||||
void checkPtr(void* ptr);
|
void checkPtr(void* ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -922,7 +922,7 @@ void SceneZoneSpaceManager::verifyState()
|
||||||
AssertFatal( mObjectZoneLists.containsBinItem(object->mZoneListHandle, zoneId), "SceneZoneSpaceManager::verifyState - Object doesn't have zone in list!");
|
AssertFatal( mObjectZoneLists.containsBinItem(object->mZoneListHandle, zoneId), "SceneZoneSpaceManager::verifyState - Object doesn't have zone in list!");
|
||||||
|
|
||||||
#ifndef TORQUE_DISABLE_MEMORY_MANAGER
|
#ifndef TORQUE_DISABLE_MEMORY_MANAGER
|
||||||
Memory::checkPtr( ref->object );
|
Memory::checkPtr( object );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue