diff --git a/Source/Engine/Core/Memory/Allocation.cpp b/Source/Engine/Core/Memory/Allocation.cpp index b2e74b8b6..c55ab1dab 100644 --- a/Source/Engine/Core/Memory/Allocation.cpp +++ b/Source/Engine/Core/Memory/Allocation.cpp @@ -11,7 +11,7 @@ void ArenaAllocator::Free() while (page) { #if COMPILE_WITH_PROFILER - ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, -page->Size, -1); + ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, -(int64)page->Size, -1); #endif Allocator::Free(page->Memory); Page* next = page->Next; @@ -35,7 +35,7 @@ void* ArenaAllocator::Allocate(uint64 size, uint64 alignment) { uint64 pageSize = Math::Max(_pageSize, size); #if COMPILE_WITH_PROFILER - ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, pageSize, 1); + ProfilerMemory::OnGroupUpdate(ProfilerMemory::Groups::MallocArena, (int64)pageSize, 1); #endif page = (Page*)Allocator::Allocate(sizeof(Page)); page->Memory = Allocator::Allocate(pageSize); @@ -51,4 +51,4 @@ void* ArenaAllocator::Allocate(uint64 size, uint64 alignment) page->Offset += (uint32)size; return mem; -} \ No newline at end of file +} diff --git a/Source/Engine/Profiler/ProfilerMemory.cpp b/Source/Engine/Profiler/ProfilerMemory.cpp index dc91dbc02..ed1a825d5 100644 --- a/Source/Engine/Profiler/ProfilerMemory.cpp +++ b/Source/Engine/Profiler/ProfilerMemory.cpp @@ -35,7 +35,7 @@ struct GroupNameBuffer char prev = 0; for (int32 i = 0; i < max && dst < ARRAY_COUNT(Buffer) - 2; i++) { - char cur = str[i]; + char cur = (char)str[i]; if (autoFormat && StringUtils::IsUpper(cur) && StringUtils::IsLower(prev)) { Ansi[dst] = '/'; @@ -422,7 +422,7 @@ void ProfilerMemory::OnMemoryAlloc(void* ptr, uint64 size) // Register pointer PointerData ptrData; - ptrData.Size = size; + ptrData.Size = (uint32)size; ptrData.Group = (uint8)stack.Peek(); PointersLocker.Lock(); Pointers[ptr] = ptrData;