Skip to content

Extract memory pool logic into reusable component

Jameson Miller git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest0 of 3 patches 0 repliesNew

Changes in v2 from the cover letter

- Rework the structure of commits to be more reviewer friendly.

Patches in v2 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] Extract memory pool logic into reusable component

Changes from v1:
- Rework the structure of commits to be more reviewer friendly.

This patch series extracts the memory pool implementation, currently used by fast-import, into a generalized component. This memory pool can then be generally used by any component that needs a pool of memory.

This patch is in preparation for a change to speed up the loading of indexes with a large number of cache entries by reducing the number of malloc() calls. For a rough example of how this component will be used in this capacity, please see [1].

The last commit in this series includes changes to fill out the mem_pool type into a more complete implementation. These functions are not used in this change, but we will be used in an upcoming patch series. I can remove this commit if it is desired.

[1] https://github.com/jamill/git/compare/block_allocation_base...jamill:block_allocation

Jameson Miller (5):
fast-import: rename mem_pool type to mp_block
fast-import: introduce mem_pool type
fast-import: update pool_* functions to work on local pool Move the reusable parts of memory pool into its own file Expand implementation of mem-pool type

 Makefile      |   1 +
 fast-import.c |  74 +++++----------------------
 mem-pool.c    | 161 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mem-pool.h    |  58 +++++++++++++++++++++
 4 files changed, 234 insertions(+), 60 deletions(-)
 create mode 100644 mem-pool.c
 create mode 100644 mem-pool.h
Signature · 1 line
2.14.3