Re: [PATCH 13/13] alloc: allow arbitrary repositories for alloc functions
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 3, 2018, 14:58 UTC
- Message-ID
- <CACsJy8BwAL=fmHG1kDJ+hK4gLOaYMjfVgDqYtEOnos09XhYKFw@mail.gmail.com>
- In-Reply-To
- <20180501213403.14643-14-sbeller@google.com>
On Tue, May 1, 2018 at 11:34 PM, Stefan Beller <sbeller@google.com> wrote:
Show 6 quoted lines
> @@ -501,9 +516,12 @@ void raw_object_store_clear(struct raw_object_store *o)
> void object_parser_clear(struct object_parser *o)
> {
> /*
> - * TOOD free objects in o->obj_hash.
> - *You need to free(o->obj_hash) too. If you just want to reuse existing obj_hash[] then at least clear it, leave no dangling pointers behind.
Show 9 quoted lines
> * As objects are allocated in slabs (see alloc.c), we do > * not need to free each object, but each slab instead. > */ > + clear_alloc_state(o->blob_state); > + clear_alloc_state(o->tree_state); > + clear_alloc_state(o->commit_state); > + clear_alloc_state(o->tag_state); > + clear_alloc_state(o->object_state); > }
-- Duy