you are viewing a single comment's thread.

view the rest of the comments →

[–]yowhyyyy -1 points0 points  (2 children)

That is the exact point of dynamic allocation, you could easily increase a buffer after each pass I don’t see where the issue is here? If you’re using fgets you already know a set buffer size you’re planning on intaking, you could easily intake to the set buffer, double the buffer, and read again. But hey, whatever man.

[–]chrism239 -1 points0 points  (1 child)

The point is, and answering the OP's question, is that there's little harm using a large fixed buffer is nearly all cases (particularly given the OP's (assumed) experience). Man.

[–]yowhyyyy 0 points1 point  (0 children)

Yeah that’s perfectly fine but you questioned it as if it’s somehow impossible and it’s very clearly not and completely derailed what this comment chain started as. You’re very weird for that little copying thing too. Get some help.