Building the AWS C++ SDK with CUSTOM_MEMORY_MANAGEMENT on fails unit tests

0

I am trying to build the AWS C++ SDK to use with the Unreal game engine. I have been using it for a while, however after recently updating my Unreal plugin with the latest SDK components, I ran into issues (crashes) because Unreal has its own custom memory management which does not seem compatible with the AWS SDK's.

To resolve this I have tried to override AWS's memory manager with one compatible with Unreal, by implementing Aws::Utils::Memory::MemorySystemInterface and calling Aws::Utils::Memory::InitializeAWSMemorySystem(AWSMemoryManager);

This, however, doesn't work unless the SDK has been built with the CUSTOM_MEMORY_MANAGEMENT flag. So, I went back to the SDK and tried to build it with custom memory management on with the following commands:

cmake.exe "../aws-sdk-cpp" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="core;firehose;cognito-identity" -DCUSTOM_MEMORY_MANAGEMENT=1 -DCPP_STANDARD=17 -DENABLE_UNITY_BUILD=1
MSBuild.exe ALL_BUILD.vcxproj -p:Configuration=Release

However, this seems to result in aws-core failing its unit tests. I get the following errors:

...\AWS\sdk\aws-sdk-cpp\aws-cpp-sdk-core-tests\RunTests.cpp(40): error : Expected equality of these values: [...\AWS\sdk\membuild\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj]
    memorySystem.GetCurrentOutstandingAllocations()
      Which is: 37
    0ULL
      Which is: 0
...\AWS\sdk\aws-sdk-cpp\aws-cpp-sdk-core-tests\RunTests.cpp(40): error : Expected equality of these values: [...\AWS\sdk\membuild\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj]
    memorySystem.GetCurrentBytesAllocated()
      Which is: 3472
    0ULL
      Which is: 0
...\AWS\sdk\aws-sdk-cpp\aws-cpp-sdk-core-tests\RunTests.cpp(40): error : Value of: memorySystem.IsClean() [...\AWS\sdk\membuild\aws-cpp-sdk-core-tests\aws-cpp-sdk-core-tests.vcxproj]
    Actual: false
  Expected: true

Does anyone have any clue why these unit tests are failing and how I can go about resolving it?

JonJWD
질문됨 2년 전115회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠