diff options
author | Patrik Nyblom <[email protected]> | 2013-06-11 14:50:00 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-06-11 14:50:00 +0200 |
commit | 5dd13b1efead2a8101ff1fb46937fbfa00db5269 (patch) | |
tree | dd1de1385b7648e639614909e139ff86f92aff71 /erts/emulator/beam/erl_gc.c | |
parent | fdd8705381fb3accd2c9becea902fe8754bbb0ec (diff) | |
parent | c013f8b647c29a41f351a91825906861f01d13ca (diff) | |
download | otp-OTP_R16B01_RC1.tar.gz otp-OTP_R16B01_RC1.tar.bz2 otp-OTP_R16B01_RC1.zip |
Merge branch 'pan/happi/yield_in_term_to_binary' into maintOTP_R16B01_RC1
* pan/happi/yield_in_term_to_binary:
Add testcase to stress extra_root
term_to_binary: Remove debug code and set production trap levels
Teach erl_gc:offset_rootset about extra_root
Teach external.c to handle reallocs before compression
Make all steps ofterm_to_binary work in chunks and yield
Make term_to_binary yield (trap).
OTP-11163
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 0d12e658d9..8ba94d89e9 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -1964,6 +1964,17 @@ setup_rootset(Process *p, Eterm *objv, int nobj, Rootset *rootset) ++n; } + /* + * A trapping BIF can add to rootset by setting the extra_root + * in the process_structure. + */ + if (p->extra_root != NULL) { + roots[n].v = p->extra_root->objv; + roots[n].sz = p->extra_root->sz; + ++n; + } + + ASSERT((is_nil(p->seq_trace_token) || is_tuple(follow_moved(p->seq_trace_token)) || is_atom(p->seq_trace_token))); @@ -2541,6 +2552,12 @@ offset_one_rootset(Process *p, Sint offs, char* area, Uint area_size, p->dictionary->used, offs, area, area_size); } + if (p->extra_root != NULL) { + offset_heap_ptr(p->extra_root->objv, + p->extra_root->sz, + offs, area, area_size); + } + offset_heap_ptr(&p->fvalue, 1, offs, area, area_size); offset_heap_ptr(&p->ftrace, 1, offs, area, area_size); offset_heap_ptr(&p->seq_trace_token, 1, offs, area, area_size); |