summaryrefslogtreecommitdiff
path: root/util/buffer.c
Commit message (Collapse)AuthorAgeFilesLines
* nomaintainer: Fix Lesser GPL version numberChetan Pant2020-11-151-1/+1
| | | | | | | | | | | | | | | | There is no "version 2" of the "Lesser" General Public License. It is either "GPL version 2.0" or "Lesser GPL version 2.1". This patch replaces all occurrences of "Lesser GPL version 2" with "Lesser GPL version 2.1" in comment section. This patch contains all the files, whose maintainer I could not get from ‘get_maintainer.pl’ script. Signed-off-by: Chetan Pant <chetan4windows@gmail.com> Message-Id: <20201023124424.20177-1-chetan4windows@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Adapted exec.c and qdev-monitor.c to new location] Signed-off-by: Thomas Huth <thuth@redhat.com>
* qemu-common: stop including qemu/host-utils.h from qemu-common.hPaolo Bonzini2016-05-191-0/+1
| | | | | | | Move it to the actual users. There are some inclusions of qemu/host-utils.h in headers, but they are all necessary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* util: fix comment typosWei Jiangang2016-05-181-2/+2
| | | | | | Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* util: Clean up includesPeter Maydell2016-02-041-0/+1
| | | | | | | | | | Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1454089805-5470-6-git-send-email-peter.maydell@linaro.org
* buffer: allow a buffer to shrink gracefullyPeter Lieven2015-11-051-8/+33
| | | | | | | | | | | 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
* buffer: factor out buffer_adj_sizePeter Lieven2015-11-051-15/+10
| | | | | | | 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-19-git-send-email-kraxel@redhat.com
* buffer: factor out buffer_req_sizePeter Lieven2015-11-051-2/+8
| | | | | | | 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-18-git-send-email-kraxel@redhat.com
* buffer: add tracingGerd Hoffmann2015-11-051-0/+18
| | | | | | | 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-7-git-send-email-kraxel@redhat.com
* buffer: add buffer_shrinkGerd Hoffmann2015-11-051-1/+19
| | | | | | | 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
* buffer: add buffer_moveGerd Hoffmann2015-11-051-0/+16
| | | | | | | 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-5-git-send-email-kraxel@redhat.com
* buffer: add buffer_move_emptyGerd Hoffmann2015-11-051-0/+14
| | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel Berrange <berrange@redhat.com> Message-id: 1446203414-4013-4-git-send-email-kraxel@redhat.com
* buffer: add buffer_initGerd Hoffmann2015-11-051-0/+11
| | | | | | | 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-3-git-send-email-kraxel@redhat.com
* buffer: make the Buffer capacity increase in powers of twoPeter Lieven2015-11-051-1/+4
| | | | | | | | | | | | | This makes sure the number of reallocs is in O(log N). Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1446203414-4013-2-git-send-email-kraxel@redhat.com [ rebased to util/buffer.c ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* util: pull Buffer code out of VNC moduleDaniel P. Berrange2015-10-201-0/+65
The Buffer code in the VNC server is useful for the IO channel code, so pull it out into a shared module, QIOBuffer. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>