diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-05-11 17:20:54 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-13 02:01:48 (GMT) |
commit | 25f859fdf49c37780685d07ebda81b7716fb5879 (patch) | |
tree | 254c15f5dc4fe7fd512cee81372eab5a9410ad59 /commit.h | |
parent | ccdcbd54c4475c2238b310f7113ab3075b5abc9c (diff) | |
download | git-25f859fdf49c37780685d07ebda81b7716fb5879.zip git-25f859fdf49c37780685d07ebda81b7716fb5879.tar.gz git-25f859fdf49c37780685d07ebda81b7716fb5879.tar.bz2 |
commit.h: rearrange 'index' to shrink struct commit
On linux 64-bit architecture, pahole finds that there's a 4 bytes
padding after 'index'. Moving it to the end reduces this struct's size
from 72 to 64 bytes (because of another 4 bytes padding after
graph_pos). On linux 32-bit, the struct size remains 52 bytes like
before.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -19,11 +19,11 @@ struct commit_list { struct commit { struct object object; void *util; - unsigned int index; timestamp_t date; struct commit_list *parents; struct tree *tree; uint32_t graph_pos; + unsigned int index; }; extern int save_commit_buffer; |