alloc: allow arbitrary repositories for alloc functions
We have to convert all of the alloc functions at once, because alloc_report uses a funky macro for reporting. It is better for the sake of mechanical conversion to convert multiple functions at once rather than changing the structure of the reporting function. We record all memory allocation in alloc.c, and free them in clear_alloc_state, which is called for all repositories except the_repository. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
341e45e46b
commit
14ba97f81c
8
object.h
8
object.h
@ -4,6 +4,14 @@
|
||||
struct parsed_object_pool {
|
||||
struct object **obj_hash;
|
||||
int nr_objs, obj_hash_size;
|
||||
|
||||
/* TODO: migrate alloc_states to mem-pool? */
|
||||
struct alloc_state *blob_state;
|
||||
struct alloc_state *tree_state;
|
||||
struct alloc_state *commit_state;
|
||||
struct alloc_state *tag_state;
|
||||
struct alloc_state *object_state;
|
||||
unsigned commit_count;
|
||||
};
|
||||
|
||||
struct parsed_object_pool *parsed_object_pool_new(void);
|
||||
|
Reference in New Issue
Block a user