Re: [PATCH 1/2] add macro REALLOC_ARRAY

2014-09-24 Thread Michael Haggerty
On 09/16/2014 08:56 PM, René Scharfe wrote: The macro ALLOC_GROW manages several aspects of dynamic memory allocations for arrays: It performs overprovisioning in order to avoid reallocations in future calls, updates the allocation size variable, multiplies the item size and thus allows users

Re: [PATCH 1/2] add macro REALLOC_ARRAY

2014-09-24 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 09/16/2014 08:56 PM, René Scharfe wrote: The macro ALLOC_GROW manages several aspects of dynamic memory allocations for arrays: It performs overprovisioning in order to avoid reallocations in future calls, updates the allocation size variable,

Re: [PATCH 1/2] add macro REALLOC_ARRAY

2014-09-24 Thread René Scharfe
Am 24.09.2014 um 09:32 schrieb Michael Haggerty: Is there a reason that ALLOC_GROW and REALLOC_ARRAY are defined in two separate header files (cache.h and git-compat-util.h, respectively)? It seems to me that they are close siblings and therefore I find it surprising that they are not defined