aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/index.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-01-19 12:10:20 +0100
committerSverker Eriksson <[email protected]>2012-02-21 12:22:58 +0100
commitaac03c5e9ccf9f6066e291a7c87dd58c1181c227 (patch)
tree149f9533c5fae8b64c7c083eb211b9902be9db1c /erts/emulator/beam/index.c
parent5ed73504d7409a449ec4e0c0de421a93c4570e3b (diff)
downloadotp-aac03c5e9ccf9f6066e291a7c87dd58c1181c227.tar.gz
otp-aac03c5e9ccf9f6066e291a7c87dd58c1181c227.tar.bz2
otp-aac03c5e9ccf9f6066e291a7c87dd58c1181c227.zip
erts: Multiple module tables using code_ix
Diffstat (limited to 'erts/emulator/beam/index.c')
-rw-r--r--erts/emulator/beam/index.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/erts/emulator/beam/index.c b/erts/emulator/beam/index.c
index a4a3007f93..7cd45440f4 100644
--- a/erts/emulator/beam/index.c
+++ b/erts/emulator/beam/index.c
@@ -135,3 +135,18 @@ void erts_index_merge(Hash* src, IndexTable* dst)
}
}
}
+
+void index_erase_latest_from(IndexTable* t, Uint from_ix)
+{
+ if(from_ix < (Uint)t->entries) {
+ int ix;
+ for (ix = from_ix; ix < t->entries; ix++) {
+ IndexSlot* obj = t->seg_table[ix>>INDEX_PAGE_SHIFT][ix&INDEX_PAGE_MASK];
+ hash_erase(&t->htable, obj);
+ }
+ t->entries = from_ix;
+ }
+ else {
+ ASSERT(from_ix == t->entries);
+ }
+}