mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
buffer: add buffer_shrink
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-6-git-send-email-kraxel@redhat.com
This commit is contained in:
parent
830a958320
commit
1ff36b5d4d
2 changed files with 29 additions and 1 deletions
|
@ -51,6 +51,16 @@ struct Buffer {
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue