| 52 | } |
| 53 | |
| 54 | uint64_t MemLayout::totalSize(int types, int flags) |
| 55 | { |
| 56 | readLayout(); |
| 57 | |
| 58 | std::string line; |
| 59 | MemSection::reset(); |
| 60 | |
| 61 | int total_size = 0; |
| 62 | while (std::getline(mapsfile, line)) { |
| 63 | MemSection section; |
| 64 | section.readMap(line); |
| 65 | |
| 66 | if (!section.followFlags(flags)) |
| 67 | continue; |
| 68 | |
| 69 | if (section.type & types) { |
| 70 | total_size += section.size; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | if (mapsfile.is_open()) |
| 75 | mapsfile.close(); |
| 76 | |
| 77 | return total_size; |
| 78 | } |
| 79 | |
| 80 | bool MemLayout::nextSection(int types, int flags, MemSection §ion) |
| 81 | { |
no test coverage detected