Merge branch 'js/try-to-free-stackable'

* js/try-to-free-stackable:
  Do not call release_pack_memory in malloc wrappers when GIT_TRACE is used
  Have set_try_to_free_routine return the previous routine
This commit is contained in:
Junio C Hamano
2010-06-13 11:21:21 -07:00
4 changed files with 16 additions and 5 deletions

View File

@ -10,9 +10,11 @@ static void try_to_free_builtin(size_t size)
static void (*try_to_free_routine)(size_t size) = try_to_free_builtin;
void set_try_to_free_routine(void (*routine)(size_t))
try_to_free_t set_try_to_free_routine(try_to_free_t routine)
{
try_to_free_routine = (routine) ? routine : try_to_free_builtin;
try_to_free_t old = try_to_free_routine;
try_to_free_routine = routine;
return old;
}
char *xstrdup(const char *str)