| 49 | // Helpers ----------------------------------------------------------------- |
| 50 | |
| 51 | static mt_offset_t ComputeNextOffset(mt_offset_t curr_offset, int8_t size) { |
| 52 | uint32_t overflow; |
| 53 | int8_t rounded_size; |
| 54 | |
| 55 | rounded_size = align_ceil_pow2(size); |
| 56 | |
| 57 | if (curr_offset % rounded_size) { |
| 58 | curr_offset = align_ceil(curr_offset, rounded_size); |
| 59 | } |
| 60 | |
| 61 | overflow = (uint32_t)curr_offset + (uint32_t)size; |
| 62 | |
| 63 | return overflow > kMetadataTotalSize ? kMetadataOffsetNoSpace : curr_offset; |
| 64 | } |
| 65 | |
| 66 | // Generate warnings for modules that read metadata that never gets set. |
| 67 | static void CheckOrphanReaders() { |
no test coverage detected