From d3ff6f55012c939740ce0982b24aeb6fba3c6e4f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 17 Jun 2006 18:26:18 -0700 Subject: Move "void *util" from "struct object" into "struct commit" Every single user actually wanted this only for commit objects, and we have no reason to waste space on it for other object types. So just move the structure member from the low-level "struct object" into the "struct commit". This leaves the commit object the same size, and removes one unnecessary pointer from all other object allocations. This shrinks memory usage (still at a fairly hefty half-gig, admittedly) of "git-rev-list --all --objects" on the mozilla repo by another 5% in my tests. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- commit.h | 1 + 1 file changed, 1 insertion(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index c9de1677e9..7c9ca3fbed 100644 --- a/commit.h +++ b/commit.h @@ -11,6 +11,7 @@ struct commit_list { struct commit { struct object object; + void *util; unsigned long date; struct commit_list *parents; struct tree *tree; -- cgit v1.2.3