aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-01-24 14:46:06 +0100
committerSverker Eriksson <[email protected]>2011-02-03 19:31:13 +0100
commit9fa33de8e1654484851555cd54b0b5118eb32069 (patch)
tree4d88e562a449187add9bd15c6ecd29eb917a4590 /erts/emulator/beam/erl_db.c
parentb066f2f18ba3192c2fae4e8dde570501ad5961bd (diff)
downloadotp-9fa33de8e1654484851555cd54b0b5118eb32069.tar.gz
otp-9fa33de8e1654484851555cd54b0b5118eb32069.tar.bz2
otp-9fa33de8e1654484851555cd54b0b5118eb32069.zip
HALFWORD ETS Further match spec optimization to minimize copying and garbage
Diffstat (limited to 'erts/emulator/beam/erl_db.c')
-rw-r--r--erts/emulator/beam/erl_db.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c
index 02f16899ae..5b74240cc3 100644
--- a/erts/emulator/beam/erl_db.c
+++ b/erts/emulator/beam/erl_db.c
@@ -2713,7 +2713,6 @@ BIF_RETTYPE ets_match_spec_run_r_3(BIF_ALIST_3)
Binary *mp;
Eterm res;
Uint32 dummy;
- Uint sz;
if (!(is_list(BIF_ARG_1) || BIF_ARG_1 == NIL) || !is_binary(BIF_ARG_2)) {
error:
@@ -2738,11 +2737,10 @@ BIF_RETTYPE ets_match_spec_run_r_3(BIF_ALIST_3)
BIF_TRAP3(bif_export[BIF_ets_match_spec_run_r_3],
BIF_P,lst,BIF_ARG_2,ret);
}
- res = db_prog_match(BIF_P, mp, CAR(list_val(lst)), NULL, NULL, 0, &dummy);
+ res = db_prog_match(BIF_P, mp, CAR(list_val(lst)), NULL, NULL, 0,
+ ERTS_PAM_COPY_RESULT, &dummy);
if (is_value(res)) {
- sz = size_object(res);
- hp = HAlloc(BIF_P, sz + 2);
- res = copy_struct(res, sz, &hp, &MSO(BIF_P));
+ hp = HAlloc(BIF_P, 2);
ret = CONS(hp,res,ret);
/*hp += 2;*/
}