diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2016-03-20 12:01:45 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2016-03-20 12:01:45 +0100 |
commit | 4ed9e939e2e44d202799b2562ac95eb9da5689e3 (patch) | |
tree | 27ef3a12b403a4c8b9164594deb9364cfbebe05c /src/tree.h | |
parent | 60a194aa86d54ffb55c1abff8d0ef05647f936e8 (diff) | |
download | libgit2-cmn/tree-reuse.tar.gz |
tree: store the entries in a growable arraycmn/tree-reuse
Take advantage of the constant size of tree-owned arrays and store them
in an array instead of a pool. This still lets us free them all at once
but lets the system allocator do the work of fitting them in.
Diffstat (limited to 'src/tree.h')
-rw-r--r-- | src/tree.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tree.h b/src/tree.h index 00b27ae41..a108d964c 100644 --- a/src/tree.h +++ b/src/tree.h @@ -17,16 +17,15 @@ struct git_tree_entry { uint16_t attr; uint16_t filename_len; - git_oid *oid; - bool pooled; + const git_oid *oid; const char *filename; }; struct git_tree { git_object object; git_odb_object *odb_obj; + git_array_t(git_tree_entry) entries_arr; git_vector entries; - git_pool pool; }; struct git_treebuilder { |