summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: debed2a)
raw | patch | inline | side by side (parent: debed2a)
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Tue, 25 Oct 2011 18:00:04 +0000 (20:00 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 26 Oct 2011 22:25:59 +0000 (15:25 -0700) |
Since in-memory index entries are allocated individually now, the
variable slack at the end meant to provide an eight byte alignment
is not needed anymore. Have a single NUL instead. This saves zero
to seven bytes for an entry, depending on its filename length.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
variable slack at the end meant to provide an eight byte alignment
is not needed anymore. Have a single NUL instead. This saves zero
to seven bytes for an entry, depending on its filename length.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | patch | blob | history |
index 59840a4dceab7c75bea838cd11d55a70b7fd5420..15c619d1619f1e807f1f8a143db2b047fc418905 100644 (file)
--- a/cache.h
+++ b/cache.h
}
#define flexible_size(STRUCT,len) ((offsetof(struct STRUCT,name) + (len) + 8) & ~7)
-#define cache_entry_size(len) flexible_size(cache_entry,len)
+#define cache_entry_size(len) (offsetof(struct cache_entry,name) + (len) + 1)
#define ondisk_cache_entry_size(len) flexible_size(ondisk_cache_entry,len)
#define ondisk_cache_entry_extended_size(len) flexible_size(ondisk_cache_entry_extended,len)