aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2011-10-24 23:59:14 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-26 15:25:59 -0700
commitdebed2a6291a29fd7b0e96f63fbf0142ed3280eb (patch)
tree89aac247843d0ca266dcf854bf656976189281f8 /cache.h
parent10b2a48113b8ab6b8f48229eb40fc3637ce025ae (diff)
downloadgit-debed2a6291a29fd7b0e96f63fbf0142ed3280eb.tar.gz
git-debed2a6291a29fd7b0e96f63fbf0142ed3280eb.tar.xz
read-cache.c: allocate index entries individually
The code to estimate the in-memory size of the index based on its on-disk representation is subtly wrong for certain architecture-dependent struct layouts. Instead of fixing it, replace the code to keep the index entries in a single large block of memory and allocate each entry separately instead. This is both simpler and more flexible, as individual entries can now be freed. Actually using that added flexibility is left for a later patch. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 2e6ad3604..59840a4dc 100644
--- a/cache.h
+++ b/cache.h
@@ -316,7 +316,6 @@ struct index_state {
struct string_list *resolve_undo;
struct cache_tree *cache_tree;
struct cache_time timestamp;
- void *alloc;
unsigned name_hash_initialized : 1,
initialized : 1;
struct hash_table name_hash;