]> git.ipfire.org Git - thirdparty/glibc.git/commit
libio: Convert __vasprintf_internal to buffers
authorFlorian Weimer <fweimer@redhat.com>
Mon, 19 Dec 2022 17:56:55 +0000 (18:56 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 19 Dec 2022 17:56:55 +0000 (18:56 +0100)
commitaf7f4165512ea242b5f711ee03a04f6afe22232d
treec4fd7778fa2e513af3105bc97eccddbb60d31ef7
parentfb9bd841b8e8b22a42fd68c56355c2ddd211db21
libio: Convert __vasprintf_internal to buffers

The buffer resizing algorithm is slightly different.  The initial
buffer is on the stack, and small buffers are directly allocated
on the heap using the exact required size.  The overhead of the
additional copy is compensated by the lowered setup cost for buffers
compared to libio streams.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
include/printf_buffer.h
libio/vasprintf.c
stdio-common/printf_buffer_flush.c