Improvements to MistUtilRAX

This commit is contained in:
Thulinma 2020-12-07 20:15:46 +01:00
parent 75642d6d73
commit 0d956dca26
2 changed files with 4 additions and 3 deletions

View file

@ -569,6 +569,8 @@ namespace Util{
std::stringstream r;
uint64_t delled = getDeleted();
uint64_t max = getEndPos();
if (max - delled > getRCount()){max = delled + getRCount();}
if (max == 0){max = getRCount();}
r << std::string(indent, ' ') << "RelAccX: " << getRCount() << " x " << getRSize() << "b @"
<< getOffset() << " (#" << getDeleted() << " - #" << getEndPos() - 1 << ")" << std::endl;
for (uint64_t i = delled; i < max; ++i){

View file

@ -10,9 +10,8 @@ int main(int argc, char **argv){
}
IPC::sharedPage f(argv[1], 0, false, false);
const Util::RelAccX A(f.mapped, false);
if (A.isReady()){
std::cout << A.toPrettyString() << std::endl;
}else{
if (!A.isReady()){
std::cout << "Memory structure " << argv[1] << " is not ready" << std::endl;
}
std::cout << A.toPrettyString() << std::endl;
}