Changes from V2: - Tweak logic of finding available memory block for memory allocation - Only search head block - Tweaked handling of large memory allocations. - Large blocks now tracked in same manner as "regular" blocks - Large blocks are placed at end of linked list of memory blocks - Cache_entry type gains notion of whether it was allocated from memory pool or not - Collapsed cache_entry discard logic into single function. This should make code easier to maintain - Small tweaks based on V1 feedback Base Ref: master Web-Diff: git@xxxxxxxxxx:jamill/git.git/commit/d608515f9e Checkout: git fetch git@xxxxxxxxxx:jamill/git.git users/jamill/block_allocation-v3 && git checkout d608515f9e Jameson Miller (7): read-cache: teach refresh_cache_entry() to take istate block alloc: add lifecycle APIs for cache_entry structs mem-pool: only search head block for available space mem-pool: add lifecycle management functions mem-pool: fill out functionality block alloc: allocate cache entries from mem_pool block alloc: add validations around cache_entry lifecyle apply.c | 26 +++-- blame.c | 5 +- builtin/checkout.c | 8 +- builtin/difftool.c | 8 +- builtin/reset.c | 6 +- builtin/update-index.c | 26 +++-- cache.h | 53 +++++++++- fast-import.c | 2 +- git.c | 3 + mem-pool.c | 116 ++++++++++++++++++++-- mem-pool.h | 25 ++++- merge-recursive.c | 4 +- read-cache.c | 261 ++++++++++++++++++++++++++++++++++++++++--------- resolve-undo.c | 6 +- split-index.c | 58 ++++++++--- tree.c | 4 +- unpack-trees.c | 38 +++---- 17 files changed, 514 insertions(+), 135 deletions(-) base-commit: ccdcbd54c4475c2238b310f7113ab3075b5abc9c -- 2.14.3