MCPcopy Create free account
hub / github.com/clementgallet/libTAS / totalSize

Method totalSize

src/program/ramsearch/MemLayout.cpp:54–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54uint64_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
80bool MemLayout::nextSection(int types, int flags, MemSection &section)
81{

Callers 2

locatePointersMethod · 0.80
predictScanCountMethod · 0.80

Calls 3

readMapMethod · 0.80
followFlagsMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected