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

Re: [PATCH 1/8] git-repack --max-pack-size: Add new file statics and struct fields

From
Junio C Hamano <junkio@cox.net>
Date
Apr 8, 2007, 23:55 UTC
Message-ID
<7vabxi8lqv.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<46197885.3060502@gmail.com>
Dana How <danahow@gmail.com> writes:
> ... The fields
> in object_entry are re-arranged & shrunk to save memory.

Is the driving principle "place fields with coarser alignment requirements first in the struct"? I noticed you have a handful pointers and an off_t after two short fields. Two shorts would be likely to make the next field aligned suitable for an int, but (1) if we ever add another short later that would not be true anymore, and (2) I suspect a pointer and an off_t can be longer than an int but int would never be longer than them.

Previous: Dana HowNext: Dana How
Message 2 of 3 in “git-repack --max-pack-size: Add new file statics and struct fields”
  1. 1/8 git-repack --max-pack-size: Add new file statics and struct fieldsDana How, Apr 8, 2007
  2. Junio C HamanoApr 8, 2007
  3. Dana HowApr 9, 2007

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.