Skip to content

libqos: add a simple first-fit memory allocator

John Snow qemu-devel 3 versions – Applied

Status from this message: Thanks, applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 3 repliesApplied
  2. v24 patches 5 repliesSuperseded
  3. v14 patches 1 replySuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4libqos: Correct mask to align size to PAGE_SIZE in malloc-pctests/libqos/malloc-pc.c+1 -10 replies
2/4libqos: Change free function called in malloctests/libqos/malloc.h+1 -10 replies
3/4libqos: add a simple first-fit memory allocatortests/libqos/malloc-pc.c tests/libqos/malloc-pc.h+279 -100 replies
4/4qtest/ide: Uninitialize PC allocatortests/ide-test.c+2 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan Hajnoczi
SeriesR-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/4] libqos: add a simple first-fit memory allocator

This set collects two patches by Marc Marí already on the mailing list, but goes further by adding a simple memory allocator that allows us to track and debug freed memory, and optionally keep track of any leaks.

For convenience: https://github.com/jnsnow/qemu/tree/libqos-alloc

v2: use QTAILQ as a basis for the linked list implementation instead.
Correct an error in the size of the initial node.
v3: remove mlist wrappers around QTAILQ interface for clarity.
adjust the options controlling when to do allocation list debugging.

John Snow (2):
libqos: add a simple first-fit memory allocator
qtest/ide: Uninitialize PC allocator

Marc Marí (2):
libqos: Correct mask to align size to PAGE_SIZE in malloc-pc
libqos: Change free function called in malloc

 tests/ide-test.c         |   2 +
 tests/libqos/malloc-pc.c | 280 +++++++++++++++++++++++++++++++++++++++++++++--
 tests/libqos/malloc-pc.h |   9 ++
 tests/libqos/malloc.h    |   2 +-
 4 files changed, 282 insertions(+), 11 deletions(-)
Signature · 1 line
1.9.3