Why is there no realloc that takes the number of bytes to copy?

by g0xA52A2Aon 4/11/24, 7:43 PMwith 2 comments
by compressedgason 4/11/24, 10:41 PM

Why not a realloc which just fails if it has to copy?

by dave4420on 4/11/24, 8:22 PM

Is it good enough to realloc down to the number of bytes you’d want copying, and then realloc up to your desired buffer size?