MetaFusion/dnacalib/DNACalib/include/pma/resources/AlignedMemoryResource.h
2025-02-05 01:52:29 +08:00

23 lines
510 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "pma/Defs.h"
#include "pma/MemoryResource.h"
#include <cstddef>
namespace pma {
/**
@brief A MemoryResource that honors alignment requirements.
@see MemoryResource
*/
class PMAAPI AlignedMemoryResource : public MemoryResource {
public:
void* allocate(std::size_t size, std::size_t alignment) override;
void deallocate(void* ptr, std::size_t size, std::size_t alignment) override;
};
} // namespace pma