Fixed erasing pages from index when they are no longer in use
This commit is contained in:
parent
c4399bb8a0
commit
cc004dd5bb
1 changed files with 6 additions and 0 deletions
|
@ -187,6 +187,12 @@ namespace Mist {
|
||||||
if (!it2->second){
|
if (!it2->second){
|
||||||
dataPages[it->first].erase(it2->first);
|
dataPages[it->first].erase(it2->first);
|
||||||
pageCounter[it->first].erase(it2->first);
|
pageCounter[it->first].erase(it2->first);
|
||||||
|
for (int i = 0; i < 8192; i += 8){
|
||||||
|
unsigned int thisKeyNum = ntohl(((((long long int *)(indexPages[it->first].mapped + i))[0]) >> 32) & 0xFFFFFFFF);
|
||||||
|
if (thisKeyNum == it2->first){
|
||||||
|
(((long long int *)(indexPages[it->first].mapped + i))[0]) = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
change = true;
|
change = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue