D3D12 Memory Allocator

The industry-leading, open source, memory allocation library for the DirectX®12 API.

The D3D12 Memory Allocator (D3D12MA) is a C++ library that provides a simple and easy-to-integrate API to help you allocate memory for DirectX®12 buffers and textures.

Download the latest version - v2.0.0

*We recommend using the code from the master branch.

This release adds the following features:

  • Powerful custom pools, which give an opportunity to not only keep certain resources together, reserve some minimum or limit the maximum amount of memory they can take, but also to pass additional allocation parameters unavailable to simple allocations. Among them, probably the most interesting is POOL_DESC::HeapProperties , which allows you to specify parameters of a custom memory type, which may be useful on UMA platforms. Committed allocations can now also be created in custom pools.
  • The API for statistics and budget has been redesigned – see structures Statistics, Budget, DetailedStatistics, TotalStatistics.
  • The library exposes its core allocation algorithm via the “virtual allocator” interface. This can be used to allocate pieces of custom memory or whatever you like, even something completely unrelated to graphics.
  • The allocation algorithm has been replaced with the new, more efficient TLSF.
  • Added support for defragmentation.
  • Objects of the library can be used with smart pointers designed for COM objects.

Benefits

This library can help developers to manage memory allocations and resource creation by offering function Allocator::CreateResource similar to the standard ID3D12Device::CreateCommittedResource .

It internally:

  • Allocates and keeps track of bigger memory heaps, used and unused ranges inside them, finds best matching unused ranges to create new resources there as placed resources.
  • Automatically respects size and alignment requirements for created resources.
  • Automatically handles resource heap tier – whether it’s D2D12_RESOURCE_HEAP_TIER_1 that requires to keep certain classes of resources separate or D3D12_RESOURCE_HEAP_TIER_2 that allows to keep them all together.

Additional features

Version history

Our other SDKs

HIP RT

HIP RT is a ray tracing library for HIP, making it easy to write ray tracing applications in HIP.

Orochi

Orochi is a library which loads HIP and CUDA® APIs dynamically, allowing the user to switch APIs at runtime.

AMD Radeon™ ProRender is our fast, easy, and incredible physically-based rendering engine built on industry standards that enables accelerated rendering on virtually any GPU, any CPU, and any OS in over a dozen leading digital content creation and CAD applications.

Radeon™ Machine Learning (Radeon™ ML or RML) is an AMD SDK for high-performance deep learning inference on GPUs.

Harness the power of machine learning to enhance images with denoising, enabling your application to produce high quality images in a fraction of the time traditional denoising filters take.

The Advanced Media Framework SDK provides developers with optimal access to AMD GPUs for multimedia processing.

The AMD Display Library (ADL) SDK is designed to access display driver functionality for AMD Radeon™ and AMD FirePro™ graphics cards.

The AMD GPU Services (AGS) library provides software developers with the ability to query AMD GPU software and hardware state information that is not normally available through standard operating systems or graphics APIs.

VMA is our single-header, MIT-licensed, C++ library for easily and efficiently managing memory allocation for your Vulkan® games and applications.

AMD TrueAudio Next is a software development kit for GPU accelerated and multi-core high-performance audio signal processing.

Radeon ProRender

AMD Radeon™ ProRender is a powerful physically-based path traced rendering engine that enables creative professionals to produce stunningly photorealistic images.

The lightweight accelerated ray intersection library for DirectX®12 and Vulkan®.