diff options
Diffstat (limited to 'include/qemu/buffer.h')
-rw-r--r-- | include/qemu/buffer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/buffer.h b/include/qemu/buffer.h index 1358df1aac..0a69b3a972 100644 --- a/include/qemu/buffer.h +++ b/include/qemu/buffer.h @@ -52,6 +52,16 @@ void buffer_init(Buffer *buffer, const char *name, ...) GCC_FMT_ATTR(2, 3); /** + * buffer_shrink: + * @buffer: the buffer object + * + * Try to shrink the buffer. Checks current buffer capacity and size + * and reduces capacity in case only a fraction of the buffer is + * actually used. + */ +void buffer_shrink(Buffer *buffer); + +/** * buffer_reserve: * @buffer: the buffer object * @len: the minimum required free space |