diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2019-09-25 11:28:41 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2019-09-25 11:28:41 +0300 |
commit | ddd788fc3c3701405efde47c3f540bdf01c878dd (patch) | |
tree | 638d81376a27124daf807a6132a96d642158b001 /malloc.c | |
parent | cc3fcc97aab53bddd89ed9ad58384c8cae18c28b (diff) | |
download | bdwgc-ddd788fc3c3701405efde47c3f540bdf01c878dd.tar.gz |
Set GC_collecting hint for GC_collect_a_little_inner calls (pthreads)
* alloc.c (GC_try_to_collect_inner, GC_collect_a_little): Wrap
GC_collect_a_little_inner() call into ENTER/EXIT_GC().
* gc_dlopen.c [!USE_PROC_FOR_LIBRARIES] (disable_gc_for_dlopen):
Likewise.
* malloc.c (GC_alloc_large): Likewise.
Diffstat (limited to 'malloc.c')
-rw-r--r-- | malloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -52,8 +52,11 @@ GC_INNER ptr_t GC_alloc_large(size_t lb, int k, unsigned flags) LOCK(); } /* Do our share of marking work */ - if (GC_incremental && !GC_dont_gc) + if (GC_incremental && !GC_dont_gc) { + ENTER_GC(); GC_collect_a_little_inner((int)n_blocks); + EXIT_GC(); + } h = GC_allochblk(lb, k, flags); # ifdef USE_MUNMAP if (0 == h) { |