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

Re: [PATCH v2] alloc.h|c: migrate alloc_states to mem-pool

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 1, 2021, 17:56 UTC
Message-ID
<xmqqpn1jn033.fsf@gitster.c.googlers.com>
In-Reply-To
<pull.857.v2.git.1612175966786.gitgitgadget@gmail.com>
"阿德烈 via GitGitGadget"  <gitgitgadget@gmail.com> writes:
> From: ZheNing Hu <adlternative@gmail.com>
>
> "alloc_state" may have similar effects with "mem_pool".

What "similar effects" do you have in mind? "mem_pool" may have more than one "effects" to multiple things that are affected, but it is unclear which effect that "mem_pool" exerts on what you are referring to.

> Using the new memory pool API may be more beneficial
> to our memory management in the future.

Many things may or may not be "beneficial" in the future. We do not build things on a vague "hunch".

Are you seeking performance (e.g. number of objects that can be allocated per minute)? Are you seeking better memory locality (e.g. related objects are likely to be stored in the same page, reducing number of page faults)? Are you seeking reduced wasted memory (e.g. custom allocator packs objects better than bog-standard malloc(3))? Are you seeking functionality (e.g. you have this and that specific codepaths and usecase where you wish to be able to release all the objects instantiated for a particular repository, without having to go through the list of all objects, and use of mempool is one way to allow us do so)?

It is not even clear in your problem description what kind of benefit you are seeking, let alone how much quantitative improvement you are getting with this change.

Previous: René Scharfe.Next: 胡哲宁
Message 6 of 8 in “alloc.h|c: migrate alloc_states to mem-pool”
  1. alloc.h|c: migrate alloc_states to mem-pool阿德烈 via GitGitGadget, Jan 30, 2021
  2. alloc.h|c: migrate alloc_states to mem-pool阿德烈 via GitGitGadget, Feb 1, 2021
  3. René ScharfeFeb 1, 2021
  4. 胡哲宁Feb 2, 2021
  5. René Scharfe.Feb 2, 2021
  6. Junio C HamanoFeb 1, 2021
  7. 胡哲宁Feb 2, 2021
  8. alloc.h|c: migrate alloc_states to mem-pool阿德烈 via GitGitGadget, Feb 4, 2021

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.