From 6d366f0ae53669a17de96db0094ef62217b60f1b Mon Sep 17 00:00:00 2001 From: happi Date: Fri, 3 May 2013 16:25:37 +0200 Subject: Make term_to_binary yield (trap). --- erts/emulator/beam/atom.names | 2 ++ 1 file changed, 2 insertions(+) (limited to 'erts/emulator/beam/atom.names') diff --git a/erts/emulator/beam/atom.names b/erts/emulator/beam/atom.names index 7d86e486f1..bf1480ea06 100644 --- a/erts/emulator/beam/atom.names +++ b/erts/emulator/beam/atom.names @@ -197,6 +197,7 @@ atom elib_malloc atom emulator atom enable_trace atom enabled +atom enc_term_cont atom endian atom env atom eof @@ -530,6 +531,7 @@ atom system_version atom system_architecture atom SYSTEM='SYSTEM' atom table +atom term_to_binary_of_size atom this atom thread_pool_size atom threads -- cgit v1.2.3 From 47d6fd3ccf35a4d921591dd0a9b5e69b9804b5b0 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 5 Jun 2013 12:02:11 +0200 Subject: Make all steps ofterm_to_binary work in chunks and yield Rewrite and extend of Happi's initial work Extra_root to process structure to enable GC of state - Changed the process structure to point to a separate struct, the struct also contains a destructor function to allow for proper cleanup. Rewrote encode_size_struct and enc_term to have internal versions with reduction counters which will result in interrupt for later restart when the counter reaches zero - removed the EWA_STACK from Happis version and directly save the ESTACK's and WSTACK's in the above mentioned struct (or array thereof) that are pointed out from the process structure. The destructor will take care of the deallocation in case of process death. Added ESTACK and WSTACK macros to save and restore stack and to change allocator, which makes the previously mentioned stack-save work. Rewrote enc_term to not store pointers on the stack, and use one WSTACK for commands etc and another ESTACK for Eterms - Slightly different than Happis version to make halfword code simpler. Rewrote encode_size_struct2 so that it does not store pointers on the stack, also switched to ESTACK instead of WSTACK, this also handles halfword correctly. Added interfaces for chunkwise compression, that are used from term_to_binary/2 when the compressed option is given. --- erts/emulator/beam/atom.names | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'erts/emulator/beam/atom.names') diff --git a/erts/emulator/beam/atom.names b/erts/emulator/beam/atom.names index bf1480ea06..267bcf5209 100644 --- a/erts/emulator/beam/atom.names +++ b/erts/emulator/beam/atom.names @@ -197,7 +197,6 @@ atom elib_malloc atom emulator atom enable_trace atom enabled -atom enc_term_cont atom endian atom env atom eof @@ -531,7 +530,7 @@ atom system_version atom system_architecture atom SYSTEM='SYSTEM' atom table -atom term_to_binary_of_size +atom term_to_binary_trap atom this atom thread_pool_size atom threads -- cgit v1.2.3