Are you sure it's a good idea to have it separate as opposed to either of those options:
1. Having malloc and realloc return a tuple of (ptr, usable_size)
2. Keeping this as a function, but forcing the user to call it before malloc and realloc and pass the return value to them instead of the normal size

The problem with this design is that usable_size will have to computed twice, both in malloc and when the allocator user calls it.

To decide which alternative: is it useful to know the usable size given the size without actually allocating memory? Is it useful to write an allocator where the usable size is not constant given the size?