Skip to content

Extract memory pool logic into reusable component

[email protected] git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fast-import: rename mem_pool to fi_mem_poolfast-import.c+9 -90 replies
2/3Introduce a reusable memory pool typeMakefile mem-pool.c mem-pool.h+179 -00 replies
3/3fast-import: use built-in mem poolfast-import.c+7 -430 replies

Reviews trailers per patch

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

Read the v1 thread

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

From: Jameson Miller <[email protected]>

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].

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

Jameson Miller (3):
fast-import: rename mem_pool to fi_mem_pool
Introduce a reusable memory pool type
fast-import: use built-in mem pool

 Makefile      |   1 +
 fast-import.c |  50 ++++------------------
 mem-pool.c    | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mem-pool.h    |  48 ++++++++++++++++++++++
 4 files changed, 186 insertions(+), 43 deletions(-)
 create mode 100644 mem-pool.c
 create mode 100644 mem-pool.h
Signature · 1 line
2.14.3