me yesterday doing investigation on cpp custom allocators:
okay now we have both foonathan/memory and std::pmr, some of the code must have a aligned heap allocator using std::aligned_alloc or sth
* after 15mins of digging *
NONE OF THEM DOES!!!
#cpp #moderncpp #cplusplus #cpprant

@youcai void *mem = malloc(size+ALIGN+sizeof(void*));
void **ptr = (void**)((uintptr_t)(mem+ALIGN+sizeof(void*)) & ~(ALIGN-1));
ptr[-1] = mem;

;)

@GabeMoralesVR std::aligned_alloc can do that (with no extra bytes on the lower side). Just need to write my own adapter for std::list and unique_ptr to work with it. Surprisingly no one has already done that.