diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-09-18 21:50:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-18 21:50:08 +0300 |
commit | 128666753b449bd76315c8f0a10b752c6a97561f (patch) | |
tree | 3ce94094cf31aa29f57b6b03be2ceaa041f15b51 /builtin/pack-objects.c | |
parent | 917a319ea59c130a14cff7656537ba14f593568b (diff) | |
parent | 9827d4c185e4da728f51cd77c54a38c9de62495f (diff) |
Merge branch 'jk/drop-release-pack-memory'
xmalloc() used to have a mechanism to ditch memory and address
space resources as the last resort upon seeing an allocation
failure from the underlying malloc(), which made the code complex
and thread-unsafe with dubious benefit, as major memory resource
users already do limit their uses with various other mechanisms.
It has been simplified away.
* jk/drop-release-pack-memory:
packfile: drop release_pack_memory()
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r-- | builtin/pack-objects.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index b410801edb..c8f51bc65c 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2342,15 +2342,6 @@ static void find_deltas(struct object_entry **list, unsigned *list_size, free(array); } -static void try_to_free_from_threads(size_t size) -{ - packing_data_lock(&to_pack); - release_pack_memory(size); - packing_data_unlock(&to_pack); -} - -static try_to_free_t old_try_to_free_routine; - /* * The main object list is split into smaller lists, each is handed to * one worker. @@ -2391,12 +2382,10 @@ static void init_threaded_search(void) pthread_mutex_init(&cache_mutex, NULL); pthread_mutex_init(&progress_mutex, NULL); pthread_cond_init(&progress_cond, NULL); - old_try_to_free_routine = set_try_to_free_routine(try_to_free_from_threads); } static void cleanup_threaded_search(void) { - set_try_to_free_routine(old_try_to_free_routine); pthread_cond_destroy(&progress_cond); pthread_mutex_destroy(&cache_mutex); pthread_mutex_destroy(&progress_mutex); |