No existing context I know of, right now.
It makes sense to me that the data structuring used by a memory allocator would hold allocation length information, so it would be nice to be able to read it.
The current solution that's idiomatic in C works, but when you need to refer to the memory allocation you often need two separate variables, one for the pointer to the data, and the other for the length. This impacts parameter passing, references from other structs, etc.
It would be neat if the memory allocation length were exposed, and we could just pass around one value, the pointer. I would imagine it would reduce cognitive load on the programmer (and by extension, hopefully reduce bugs).
CC:
@[email protected]