aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-02-11 10:15:53 +0100
committerBjörn Gustavsson <[email protected]>2010-03-10 14:25:27 +0100
commit3ddf0126dfcb60f0554e2d52187fa012f378e428 (patch)
tree34ddd16f0190dcfeda1a7ec57bcc9afa4e667187 /erts/emulator/beam/erl_bif_info.c
parentc591f7b2a78b44ab321d0b99c100b349c8606c15 (diff)
downloadotp-3ddf0126dfcb60f0554e2d52187fa012f378e428.tar.gz
otp-3ddf0126dfcb60f0554e2d52187fa012f378e428.tar.bz2
otp-3ddf0126dfcb60f0554e2d52187fa012f378e428.zip
Teach {wordsize,internal|external} to system_info/1
Some test suites need to differentiate between 32-bit terms and 32-bit pointers. While at it, remove some more warnings in process.c for SMP and debug.
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r--erts/emulator/beam/erl_bif_info.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index fc8d876bc4..de4d6f9109 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -1634,6 +1634,14 @@ info_1_tuple(Process* BIF_P, /* Pointer to current process. */
if (sel == am_allocator_sizes && arity == 2) {
return erts_allocator_info_term(BIF_P, *tp, 1);
+ } else if (sel == am_wordsize && arity == 2) {
+ if (tp[0] == am_internal) {
+ return make_small(sizeof(Eterm));
+ }
+ if (tp[0] == am_external) {
+ return make_small(sizeof(UWord));
+ }
+ goto badarg;
} else if (sel == am_allocated) {
if (arity == 2) {
Eterm res = THE_NON_VALUE;