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

Re: [RFC/PATCH 2/3] small-alloc: add allocator for small objects

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 23, 2011, 17:17 UTC
Message-ID
<7vpqm431sl.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1308728011-14136-3-git-send-email-davidbarr@google.com>
David Barr <davidbarr@google.com> writes:
> This allocator assigns an integer handle to each allocation which can be
> used to retrieve the pointer to the start of the allocation and its
> length.

One more thing to add to yesterday's review. I think you would need to include a "method" that initializes a mem_pool object, and possibly another to destroy an existing one, freeing the resources (unless the API is meant to replace something like obj_hash in object.c).

It was quite difficult to judge how good this API is as it took imagination on the reviewer's part on how a typical caller would look like.

Previous: David Barr
Message 12 of 12 in “[RFC/PATCH 0/3]”
  1. 0/3 David Barr, Jun 22, 2011
  2. 1/3 protobuf: minimal implementation for compact in-memory structuresDavid Barr, Jun 22, 2011
  3. Junio C HamanoJun 22, 2011
  4. David BarrJun 24, 2011
  5. David BarrJun 24, 2011
  6. Junio C HamanoJun 24, 2011
  7. Junio C HamanoJun 23, 2011
  8. 2/3 small-alloc: add allocator for small objectsDavid Barr, Jun 22, 2011
  9. Junio C HamanoJun 22, 2011
  10. David BarrJun 24, 2011
  11. David BarrJun 24, 2011
  12. Junio C HamanoJun 23, 2011

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.