The best system involves keeping end pointers, not lengths. Remaining length changes. End pointer never changes. At previous job we converted our whole code base to this system, and it worked great.
I figured the actual length value may be useful without needing pointer arithmetic, but this is a nice solution to the argument taking the size, and the return being the length (size-1, eg p[return]=NUL location.)
I'll consider this idea and write some comparisons to see how it works, thanks.
I'll consider this idea and write some comparisons to see how it works, thanks.