Files
UnrealEngine/Engine/Plugins/Media/PixelStreaming2/Source/PixelStreaming2RTC/Internal/EpicRtcAllocator.h
2025-05-18 13:04:45 +08:00

32 lines
791 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "HAL/UnrealMemory.h"
#include "epic_rtc/common/memory.h"
namespace UE::PixelStreaming2
{
class PIXELSTREAMING2RTC_API FEpicRtcAllocator : public EpicRtcMemoryInterface
{
public:
FEpicRtcAllocator() = default;
virtual ~FEpicRtcAllocator() = default;
[[nodiscard]] virtual void* Allocate(uint64_t Size, uint64_t Alignment, const char* Tag) override
{
return FMemory::Malloc(Size, Alignment);
}
[[nodiscard]] virtual void* Reallocate(void* Pointer, uint64_t Size, uint64_t Alignment, const char* Tag) override
{
return FMemory::Realloc(Pointer, Size, Alignment);
}
virtual void Free(void* Pointer) override
{
return FMemory::Free(Pointer);
}
};
} // namespace UE::PixelStreaming2