I think you're confusing `alloc_size` and `alloc_align`. I'm using `alloc_size`:

```
alloc_size
The alloc_size attribute is used to tell the compiler that the function return value points to memory, where the size is given by one or two of the functions parameters. GCC uses this information to improve the correctness of __builtin_object_size.
The function parameter(s) denoting the allocated size are specified by one or two integer arguments supplied to the attribute. The allocated size is either the value of the single function argument specified or the product of the two function arguments specified. Argument numbering starts at one.

For instance,

          void* my_calloc(size_t, size_t) __attribute__((alloc_size(1,2)))
          void* my_realloc(void*, size_t) __attribute__((alloc_size(2)))
```