API Reference — pma/resources/AlignedMemoryResource
class AlignedMemoryResource : public MemoryResource
A MemoryResource that honors alignment requirements stricter than the default allocator provides.
Why this exists
Some allocations (SIMD buffers, hardware-aligned data) need guarantees beyond what malloc/new provide by default. AlignedMemoryResource implements MemoryResource::allocate/deallocate so any pma container or PolyAllocator consumer can honor a specific alignment without special-casing its own allocation logic.
Relationships
MemoryResource— base interfaceAlignedMemoryResourceimplements.DefaultMemoryResource— sibling resource that delegates to malloc/free without alignment guarantees.
Watch out for
deallocaterequires passing the samesizeandalignmentvalues that were used in the correspondingallocatecall. Mismatched values are undefined behavior — track these at the call site.