I'm building a portable arena allocator for embedded systems.
malloc, one of the requirements is to return a pointer aligned with the memory.
The question is: Is there a way to know at compile time what are the memory alignment requirements for a given platform in C?
I've seen this code snippets floating around, but I haven't find any documentation to support it's validity:
#define DEFAULT_ALIGNMENT (2*sizeof(void *))