diff options
author | Sadiq Jaffer <sadiq@toao.com> | 2022-07-21 10:40:45 +0100 |
---|---|---|
committer | Sadiq Jaffer <sadiq@toao.com> | 2022-07-21 10:40:45 +0100 |
commit | 9da76f9065ea0d11d9b9280d741338df174ffadd (patch) | |
tree | 368d3d19495746e18721ac2eb3afa0b319706ccf /runtime/minor_gc.c | |
parent | 90c5b14d06e0cc8d557b6ffff1a6a63830992e71 (diff) | |
download | ocaml-9da76f9065ea0d11d9b9280d741338df174ffadd.tar.gz |
move EV_C_FORCE_MINOR_SET_MINOR_HEAP_SIZE to the point where the minor collection is actually forced
Diffstat (limited to 'runtime/minor_gc.c')
-rw-r--r-- | runtime/minor_gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/minor_gc.c b/runtime/minor_gc.c index 10d64acf59..30644f63e7 100644 --- a/runtime/minor_gc.c +++ b/runtime/minor_gc.c @@ -124,8 +124,10 @@ void caml_set_minor_heap_size (asize_t wsize) caml_domain_state* domain_state = Caml_state; struct caml_minor_tables *r = domain_state->minor_tables; - if (domain_state->young_ptr != domain_state->young_end) + if (domain_state->young_ptr != domain_state->young_end) { + CAML_EV_COUNTER (EV_C_FORCE_MINOR_SET_MINOR_HEAP_SIZE, 1); caml_minor_collection(); + } if(caml_reallocate_minor_heap(wsize) < 0) { caml_fatal_error("Fatal error: No memory for minor heap"); |