just for debugging:
| 237 | |
| 238 | // just for debugging: |
| 239 | void ArenaBlock::getUniqueBlocks(std::set<ArenaBlock*>& a) { |
| 240 | a.insert(this); |
| 241 | if (isTiny()) |
| 242 | return; |
| 243 | |
| 244 | int o = nextBlockOffset; |
| 245 | while (o) { |
| 246 | ArenaBlockRef* r = (ArenaBlockRef*)((char*)getData() + o); |
| 247 | makeDefined(r, sizeof(ArenaBlockRef)); |
| 248 | |
| 249 | // If next is valid recursively count its blocks |
| 250 | if (r->aligned4kBufferSize == 0) { |
| 251 | r->next->getUniqueBlocks(a); |
| 252 | } |
| 253 | |
| 254 | o = r->nextBlockOffset; |
| 255 | makeNoAccess(r, sizeof(ArenaBlockRef)); |
| 256 | } |
| 257 | return; |
| 258 | } |
| 259 | |
| 260 | int ArenaBlock::addUsed(int bytes) { |
| 261 | if (isTiny()) { |
nothing calls this directly
no test coverage detected