• Jameson Miller's avatar
    block alloc: add validations around cache_entry lifecyle · 8616a2d0
    Jameson Miller authored
    Add an option (controlled by an environment variable) perform extra
    validations on mem_pool allocated cache entries. When set:
      1) Invalidate cache_entry memory when discarding cache_entry.
      2) When discarding index_state struct, verify that all cache_entries
         were allocated from expected mem_pool.
      3) When discarding mem_pools, invalidate mem_pool memory.
    This should provide extra checks that mem_pools and their allocated
    cache_entries are being used as expected.
    Signed-off-by: default avatarJameson Miller <jamill@microsoft.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
mem-pool.h 1.38 KB