diff options
author | Björn Gustavsson <[email protected]> | 2018-10-24 12:51:35 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2018-10-24 12:51:35 +0200 |
commit | 747001c51a28a35130fa23c9da86683b0801b0a8 (patch) | |
tree | 1098e8ec73b3c6e9c18b812fa652a73323f7c7c4 /erts/emulator/beam/bif.c | |
parent | b50e4cfd3c48212642799e5a6be8d425a59e4b72 (diff) | |
parent | bc541da07768ab0e11dca183ba235422ae0df593 (diff) | |
download | otp-747001c51a28a35130fa23c9da86683b0801b0a8.tar.gz otp-747001c51a28a35130fa23c9da86683b0801b0a8.tar.bz2 otp-747001c51a28a35130fa23c9da86683b0801b0a8.zip |
Merge pull request #1991 from bjorng/bjorn/erts/fix-max_heap_size/OTP-15360
Honor the max heap size when copying literals after purging
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r-- | erts/emulator/beam/bif.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index f18af8bcd7..015c051cc1 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -3622,6 +3622,10 @@ erts_internal_garbage_collect_1(BIF_ALIST_1) default: BIF_ERROR(BIF_P, BADARG); } erts_garbage_collect(BIF_P, 0, NULL, 0); + if (ERTS_PROC_IS_EXITING(BIF_P)) { + /* The max heap size limit was reached. */ + return THE_NON_VALUE; + } return am_true; } |