aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bits.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2017-03-03 10:51:46 +0100
committerBjörn-Egil Dahlberg <[email protected]>2017-03-03 10:51:46 +0100
commit79422f489a619df0bb6fcd32ce494fb9cefdaa12 (patch)
treebd39cf79ae9ed44a5875d3f27e8184e0088574d8 /erts/emulator/beam/erl_bits.h
parentb03fffab761b99efdac70816af25f4d8df1f2a49 (diff)
parentb9847009f7ca88f61adb21f4de9db54fc1c7e96a (diff)
downloadotp-79422f489a619df0bb6fcd32ce494fb9cefdaa12.tar.gz
otp-79422f489a619df0bb6fcd32ce494fb9cefdaa12.tar.bz2
otp-79422f489a619df0bb6fcd32ce494fb9cefdaa12.zip
Merge branch 'egil/erts/sub-binary-to-heap-binary/OTP-14149'
* egil/erts/sub-binary-to-heap-binary/OTP-14149: observer: Fix crashdump viewer testcase erts: Refactor MOVE_CONS to inline function erts: Refactor MOVE_BOXED to inline function erts: Convert small sub-binaries to heap-binaries
Diffstat (limited to 'erts/emulator/beam/erl_bits.h')
-rw-r--r--erts/emulator/beam/erl_bits.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bits.h b/erts/emulator/beam/erl_bits.h
index 4bd5b24157..1b4546722f 100644
--- a/erts/emulator/beam/erl_bits.h
+++ b/erts/emulator/beam/erl_bits.h
@@ -22,6 +22,23 @@
#define __ERL_BITS_H__
/*
+ * This structure represents a SUB_BINARY.
+ *
+ * Note: The last field (orig) is not counted in arityval in the header.
+ * This simplifies garbage collection.
+ */
+
+typedef struct erl_sub_bin {
+ Eterm thing_word; /* Subtag SUB_BINARY_SUBTAG. */
+ Uint size; /* Binary size in bytes. */
+ Uint offs; /* Offset into original binary. */
+ byte bitsize;
+ byte bitoffs;
+ byte is_writable; /* The underlying binary is writable */
+ Eterm orig; /* Original binary (REFC or HEAP binary). */
+} ErlSubBin;
+
+/*
* This structure represents a binary to be matched.
*/