diff options
author | Sverker Eriksson <[email protected]> | 2012-01-19 12:10:20 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-02-21 12:22:58 +0100 |
commit | aac03c5e9ccf9f6066e291a7c87dd58c1181c227 (patch) | |
tree | 149f9533c5fae8b64c7c083eb211b9902be9db1c /erts/emulator/beam/index.c | |
parent | 5ed73504d7409a449ec4e0c0de421a93c4570e3b (diff) | |
download | otp-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.c | 15 |
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); + } +} |