diff options
author | Rickard Green <[email protected]> | 2016-05-31 15:00:50 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-05-31 15:06:54 +0200 |
commit | a6a4ce5c63cae9e0d3a35fea3074a59dd06f22fc (patch) | |
tree | 9a8b0a0ceaefa0ddc44aa3d48a020575d77b8c41 /erts | |
parent | 17e95dd8dcb0149b771d4aafaeeebc715ee59d3d (diff) | |
download | otp-a6a4ce5c63cae9e0d3a35fea3074a59dd06f22fc.tar.gz otp-a6a4ce5c63cae9e0d3a35fea3074a59dd06f22fc.tar.bz2 otp-a6a4ce5c63cae9e0d3a35fea3074a59dd06f22fc.zip |
Do not send on_heap msgs to error logger in non-smp emulator
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/utils.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index f0418446a8..675fafa726 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -2210,7 +2210,9 @@ do_allocate_logger_message(Eterm gleader, Eterm **hp, ErlOffHeap **ohp, #ifndef ERTS_SMP #ifdef USE_THREADS - if (erts_get_scheduler_data()) /* Must be scheduler thread */ + if (!erts_get_scheduler_data()) /* Must be scheduler thread */ + *p = NULL; + else #endif { *p = erts_whereis_process(NULL, 0, am_error_logger, 0, 0); @@ -2226,18 +2228,10 @@ do_allocate_logger_message(Eterm gleader, Eterm **hp, ErlOffHeap **ohp, } /* So we have an error logger, lets build the message */ - if (sz <= HeapWordsLeft(*p)) { - *ohp = &MSO(*p); - *hp = HEAP_TOP(*p); - HEAP_TOP(*p) += sz; - } else { -#endif - *bp = new_message_buffer(sz); - *ohp = &(*bp)->off_heap; - *hp = (*bp)->mem; -#ifndef ERTS_SMP - } #endif + *bp = new_message_buffer(sz); + *ohp = &(*bp)->off_heap; + *hp = (*bp)->mem; return (is_nil(gleader) ? am_noproc |