4 #include "git-compat-util.h"
16 #define alloc_nr(x) (((x)+16)*3/2)
19 * Realloc the buffer pointed at by variable 'x' so that it can hold
20 * at least 'nr' entries; the number of entries currently allocated
21 * is 'alloc', using the standard growing factor alloc_nr() macro.
23 * DO NOT USE any expression with side-effect for 'x' or 'alloc'.
25 #define ALLOC_GROW(x, nr, alloc) \
28 if (alloc_nr(alloc) < (nr)) \
31 alloc = alloc_nr(alloc); \
32 x = xrealloc((x), alloc * sizeof(*(x))); \
37 struct pack_window
*next
;
41 unsigned int last_used
;
42 unsigned int inuse_cnt
;
45 extern struct packed_git
{
46 struct packed_git
*next
;
47 struct pack_window
*windows
;
49 const void *index_data
;
52 uint32_t num_bad_objects
;
53 unsigned char *bad_object_sha1
;
58 unsigned char sha1
[20];
59 /* something like ".git/objects/pack/xxxxx.pack" */
60 char pack_name
[FLEX_ARRAY
]; /* more */