diff options
author | Björn Gustavsson <[email protected]> | 2018-10-05 13:15:49 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-10-24 12:59:48 +0200 |
commit | d6e8bddde0887894ae70cc2c6d4230532801bf97 (patch) | |
tree | 6361b3a9a813c467c639ac94c53cad7121931e5f /erts/emulator/beam/global.h | |
parent | c37f7a2215646c85c1ae12303f07bc9bc27b75ae (diff) | |
download | otp-d6e8bddde0887894ae70cc2c6d4230532801bf97.tar.gz otp-d6e8bddde0887894ae70cc2c6d4230532801bf97.tar.bz2 otp-d6e8bddde0887894ae70cc2c6d4230532801bf97.zip |
Extend the sharing-preserving routines to optionally copy literals
In the implementation of the zero-copying term storage, we
want to preserve sharing, but not copy literals because the
modules holding the literals could be unloaded under our feet.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r-- | erts/emulator/beam/global.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index 21ae205237..9fc5abbf68 100644 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -1001,6 +1001,7 @@ typedef struct { Uint literal_size; Eterm *lit_purge_ptr; Uint lit_purge_sz; + int copy_literals; } erts_shcopy_t; #define INITIALIZE_SHCOPY(info) \ @@ -1010,6 +1011,7 @@ typedef struct { info.bitstore_start = info.bitstore_default; \ info.shtable_start = info.shtable_default; \ info.literal_size = 0; \ + info.copy_literals = 0; \ if (larea__) { \ info.lit_purge_ptr = &larea__->start[0]; \ info.lit_purge_sz = larea__->end - info.lit_purge_ptr; \ |