aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/error_logger.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-02-06 13:05:56 +0100
committerGitHub <[email protected]>2017-02-06 13:05:56 +0100
commite6f84e033a6a809a68f188c306151567c9854050 (patch)
treea086e68347854d5781c9793f7d460e15e9f9b66f /lib/kernel/src/error_logger.erl
parentd2901a3e6826cfdc3eec47fc4786e7fcad2d42c5 (diff)
parent5f7f86be7bc7ec7a1c9b0042ff08254dca063d76 (diff)
downloadotp-e6f84e033a6a809a68f188c306151567c9854050.tar.gz
otp-e6f84e033a6a809a68f188c306151567c9854050.tar.bz2
otp-e6f84e033a6a809a68f188c306151567c9854050.zip
Merge pull request #1328 from bjorng/bjorn/kernel/off-heap-message/OTP-14142
Store messages for 'rex' and 'error_logger' off heap OTP-14192
Diffstat (limited to 'lib/kernel/src/error_logger.erl')
-rw-r--r--lib/kernel/src/error_logger.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/kernel/src/error_logger.erl b/lib/kernel/src/error_logger.erl
index 3523f680a3..3ee8e2c6e6 100644
--- a/lib/kernel/src/error_logger.erl
+++ b/lib/kernel/src/error_logger.erl
@@ -360,8 +360,12 @@ init(Max) when is_integer(Max) ->
%% go back.
init({go_back, _PostState}) ->
{ok, {?buffer_size, 0, []}};
-init(_) -> %% Start and just relay to other
- {ok, []}. %% node if node(GLeader) =/= node().
+init(_) ->
+ %% The error logger process may receive a huge amount of
+ %% messages. Make sure that they are stored off heap to
+ %% avoid exessive GCs.
+ process_flag(message_queue_data, off_heap),
+ {ok, []}.
-spec handle_event(term(), state()) -> {'ok', state()}.