git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] Extend and add a little more generalization to the mem_pool API

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 14, 2020, 03:02 UTC
Message-ID
<pull.830.git.git.1597374135.gitgitgadget@gmail.com>

In my new merge algorithm, I made use of the mem_pool API in a few places...but I also needed to add a few more functions. More importantly, though, I couldn't reuse the existing API as-is since I want to be able to discard the memory (after each recursive merge) and then continue adding to the pool, something the existing API was not amenable to. Instead of writing another competing API, since there is only one other user, I just modified the existing callsites to use the more generic calling structure that I needed.

Unfortunately, Matheus' parallel-checkout RFC series (not yet in next or seen as far as I can tell) adds a few more mem_pool callers, so this series conflicts with his (semantically). I can rebuild mine on top of his, or, since his is longer and would probably advance more slowly, it may make sense to have his series be based on this one. If so, I'm happy to help him update his to depend on this series. Let me know preferences.

Elijah Newren (3):
  mem-pool: add convenience functions for xstrdup and xstrndup
  mem-pool: use more standard initialization and finalization
  mem-pool: use consistent pool variable name
 fast-import.c | 12 ++-------
 mem-pool.c    | 75 ++++++++++++++++++++++++++++++++-------------------
 mem-pool.h    | 14 +++++++---
 read-cache.c  | 21 +++++++++------
 split-index.c |  6 +++--
 5 files changed, 76 insertions(+), 52 deletions(-)
base-commit: 7814e8a05a59c0cf5fb186661d1551c75d1299b5
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-830%2Fnewren%2Fmem_pool_api-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-830/newren/mem_pool_api-v1
Pull-Request: https://github.com/git/git/pull/830
-- 
gitgitgadget
Next: Elijah Newren via GitGitGadget
Message 1 of 17 in “Extend and add a little more generalization to the mem_pool API”
  1. 0/3 Extend and add a little more generalization to the mem_pool APIElijah Newren via GitGitGadget, Aug 14, 2020
  2. 1/3 mem-pool: add convenience functions for xstrdup and xstrndupElijah Newren via GitGitGadget, Aug 14, 2020
  3. Eric SunshineAug 14, 2020
  4. 3/3 mem-pool: use consistent pool variable nameElijah Newren via GitGitGadget, Aug 14, 2020
  5. 2/3 mem-pool: use more standard initialization and finalizationElijah Newren via GitGitGadget, Aug 14, 2020
  6. Junio C HamanoAug 14, 2020
  7. Matheus Tavares BernardinoAug 14, 2020
  8. 0/3 Extend and add a little more generalization to the mem_pool APIElijah Newren via GitGitGadget, Aug 14, 2020
  9. 1/3 mem-pool: add convenience functions for xstrdup and xstrndupElijah Newren via GitGitGadget, Aug 14, 2020
  10. René ScharfeAug 14, 2020
  11. 2/3 mem-pool: use more standard initialization and finalizationElijah Newren via GitGitGadget, Aug 14, 2020
  12. 3/3 mem-pool: use consistent pool variable nameElijah Newren via GitGitGadget, Aug 14, 2020
  13. 0/3 Extend and add a little more generalization to the mem_pool APIElijah Newren via GitGitGadget, Aug 15, 2020
  14. 3/3 mem-pool: use consistent pool variable nameElijah Newren via GitGitGadget, Aug 15, 2020
  15. 2/3 mem-pool: use more standard initialization and finalizationElijah Newren via GitGitGadget, Aug 15, 2020
  16. 1/3 mem-pool: add convenience functions for strdup and strndupElijah Newren via GitGitGadget, Aug 15, 2020
  17. Junio C HamanoAug 18, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.