From debed2a6291a29fd7b0e96f63fbf0142ed3280eb Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Mon, 24 Oct 2011 23:59:14 +0200 Subject: 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 Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- cache.h | 1 - 1 file changed, 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 2e6ad3604e..59840a4dce 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; -- cgit v1.3