Since the result of malloc is not guaranteed to be aligned to anything, is it even usable?
I recently learned that dereferencing a pointer not aligned for a certain object (uint32_t* foo = (uint32_t*)7; *foo = 5;
) is in fact undefined behaviour:
I recently learned that dereferencing a pointer not aligned for a certain object (uint32_t* foo = (uint32_t*)7; *foo = 5;
) is in fact undefined behaviour: