]> git.proxmox.com Git - mirror_qemu.git/commit
buffer: allow a buffer to shrink gracefully
authorPeter Lieven <pl@kamp.de>
Fri, 30 Oct 2015 11:10:14 +0000 (12:10 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Nov 2015 08:09:58 +0000 (09:09 +0100)
commitf14c3d85b003d8614144ae67a26157667c1e1245
tree0ffdab65f95a165d8a9000351ac0e22364cf39e8
parent4ec5ba151ff3f2ac8dc44dabd058eca5846654a6
buffer: allow a buffer to shrink gracefully

the idea behind this patch is to allow the buffer to shrink, but
make this a seldom operation. The buffers average size is measured
exponentionally smoothed with am alpha of 1/128.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1446203414-4013-20-git-send-email-kraxel@redhat.com
include/qemu/buffer.h
util/buffer.c