[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH v4 0/5] Memory Pools



This series implements a memory pool allocator. Pool objects have the same
size and are pre-allocated. Due to this simplification allocations and free
operations are as cheap as O(1). Its intended use is performance critical
allocations when allocation sizes do not vary, like network stacks or disk
buffer caches.

Changes since v3:
 - Remove functionality to let initialize objects by the pool.
   This should be implemented with a wrapping function instead and
   maybe less confusing when using the pool with the uk_alloc API.
 - Provide `uk_allocpool_objlen()`
 - Fix `uk_allocpool2ukalloc()`, the interface was not exported properly

Changes since v2:
 - Fix compile error when `CONFIG_LIBUKALLOC_IFSTATS` is activated

Changes since v1:
 - Correct license header in `pool.c`

Simon Kuenzer (5):
  lib/ukallocpool: Library skeleton
  lib/ukallocpool: LIFO pool implementation
  lib/ukallocpool: Allocate pool on parent allocator
  lib/ukallocpool: `lib/ukalloc` compatible interface
  lib/ukallocpool: Batched allocation

 lib/Makefile.uk                        |   1 +
 lib/ukallocpool/Config.uk              |   6 +
 lib/ukallocpool/Makefile.uk            |   6 +
 lib/ukallocpool/exportsyms.uk          |  11 +
 lib/ukallocpool/include/uk/allocpool.h | 212 +++++++++++++++
 lib/ukallocpool/pool.c                 | 350 +++++++++++++++++++++++++
 6 files changed, 586 insertions(+)
 create mode 100644 lib/ukallocpool/Config.uk
 create mode 100644 lib/ukallocpool/Makefile.uk
 create mode 100644 lib/ukallocpool/exportsyms.uk
 create mode 100644 lib/ukallocpool/include/uk/allocpool.h
 create mode 100644 lib/ukallocpool/pool.c

-- 
2.20.1



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.