| 1422 | |
| 1423 | #ifdef DEV_BUILD |
| 1424 | void Sort::checkFile(const run_control* temp_run) |
| 1425 | { |
| 1426 | /************************************** |
| 1427 | * |
| 1428 | * Validate memory and file space allocation |
| 1429 | * |
| 1430 | **************************************/ |
| 1431 | FB_UINT64 runs = temp_run ? temp_run->run_size : 0; |
| 1432 | offset_t free = 0; |
| 1433 | FB_UINT64 run_mem = 0; |
| 1434 | |
| 1435 | fb_assert(m_space->validate(free)); |
| 1436 | |
| 1437 | for (const run_control* run = m_runs; run; run = run->run_next) |
| 1438 | { |
| 1439 | runs += run->run_size; |
| 1440 | run_mem += run->run_mem_size; |
| 1441 | } |
| 1442 | |
| 1443 | fb_assert((runs + run_mem + free) == m_space->getSize()); |
| 1444 | } |
| 1445 | #endif |
| 1446 | |
| 1447 | |