util: space-efficient MemoryMap

We now use boost::icl::interval_set internally, consuming extremely
lower amounts of memory.  boost::icl was introduced with Boost 1.46;
Debian 7.0 comes with 1.49, so this dependency should be no problem
anymore.

Both the class interface and the memory-map file format stay the same.

Change-Id: I38e8148384c90aa493984d0f6280817df00f1702
This commit is contained in:
Horst Schirmeier
2014-01-30 13:40:12 +01:00
parent 119ae40be9
commit 4bcce14659
3 changed files with 61 additions and 33 deletions

View File

@ -37,9 +37,12 @@ bool MemoryMap::writeToFile(char const * const filename)
return false;
}
for (iterator it = begin(); it != end(); ++it) {
file << *it << "\t1\n";
#ifndef __puma
for (address_set::iterator it = as.begin();
it != as.end(); ++it) {
file << it->lower() << " " << (it->upper() - it->lower() + 1) << "\n";
}
#endif
return true;
}