diff options
author | Lukas Larsson <[email protected]> | 2018-12-06 11:53:18 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-12-06 11:53:18 +0100 |
commit | ea7d6c39f2179b2240d55df4a1ddd515b6d32832 (patch) | |
tree | 117436f49db44ee51a9b28c0cf94e094c31ed280 /erts/emulator/beam/erl_sched_spec_pre_alloc.h | |
parent | 551e15331967551307b1618248334b20dce3241c (diff) | |
parent | 73e4f5f21bbf492ab61c01dee48fa09fd7309a50 (diff) | |
download | otp-ea7d6c39f2179b2240d55df4a1ddd515b6d32832.tar.gz otp-ea7d6c39f2179b2240d55df4a1ddd515b6d32832.tar.bz2 otp-ea7d6c39f2179b2240d55df4a1ddd515b6d32832.zip |
Merge branch 'maint'
Conflicts:
erts/emulator/beam/erl_process.c
Diffstat (limited to 'erts/emulator/beam/erl_sched_spec_pre_alloc.h')
-rw-r--r-- | erts/emulator/beam/erl_sched_spec_pre_alloc.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_sched_spec_pre_alloc.h b/erts/emulator/beam/erl_sched_spec_pre_alloc.h index b119c59ab3..74cc966cbe 100644 --- a/erts/emulator/beam/erl_sched_spec_pre_alloc.h +++ b/erts/emulator/beam/erl_sched_spec_pre_alloc.h @@ -188,6 +188,7 @@ erts_sspa_alloc(erts_sspa_data_t *data, int cix) erts_sspa_chunk_t *chnk; erts_sspa_chunk_header_t *chdr; erts_sspa_blk_t *res; + ERTS_MSACC_PUSH_AND_SET_STATE_M_X(ERTS_MSACC_STATE_ALLOC); chnk = erts_sspa_cix2chunk(data, cix); chdr = &chnk->aligned.header; @@ -201,11 +202,15 @@ erts_sspa_alloc(erts_sspa_data_t *data, int cix) chdr->local.last = NULL; ERTS_SSPA_DBG_CHK_LCL(chdr); } - if (chdr->local.cnt <= chdr->local.lim) - return (char *) erts_sspa_process_remote_frees(chdr, res); + if (chdr->local.cnt <= chdr->local.lim) { + res = erts_sspa_process_remote_frees(chdr, res); + ERTS_MSACC_POP_STATE_M_X(); + return (char*) res; + } else if (chdr->head.no_thr_progress_check < ERTS_SSPA_FORCE_THR_CHECK_PROGRESS) chdr->head.no_thr_progress_check++; ASSERT(res); + ERTS_MSACC_POP_STATE_M_X(); return (char *) res; } |