AWSMemoryInterface.cpp 821 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <AWSNativeSDKInit/AWSMemoryInterface.h>
  9. namespace AWSNativeSDKInit
  10. {
  11. #if defined(PLATFORM_SUPPORTS_AWS_NATIVE_SDK)
  12. const char* MemoryManager::AWS_API_ALLOC_TAG = "AwsApi";
  13. void MemoryManager::Begin()
  14. {
  15. }
  16. void MemoryManager::End()
  17. {
  18. }
  19. void* MemoryManager::AllocateMemory(std::size_t blockSize, std::size_t alignment, const char* allocationTag)
  20. {
  21. return m_allocator.Allocate(blockSize, alignment, 0, allocationTag);
  22. }
  23. void MemoryManager::FreeMemory(void* memoryPtr)
  24. {
  25. m_allocator.DeAllocate(memoryPtr);
  26. }
  27. #endif
  28. }