4 ms·
> Posix 2008 does have fmemopen(), but it's unsuitable, as it is buffer with specified size (which would need to be calculated, as in the MS case), rather than
by gnubison 6y ago
> Posix 2008 does have fmemopen(), but it's unsuitable, as it is buffer with specified size (which would need to be calculated, as in the MS case), rather than not worried about until a NUL byte is reached.
With fmemopen(), you only need to calculate the length once at the start, right? And then you can use the stream instead.
- wnoise 6y agoYes, you can do that. But libc can't use that as an implementation strategy without also having this linear-turned-quadratic behavior.