| 40 | } |
| 41 | |
| 42 | void DexLayoutSection::Subsection::Madvise(const DexFile* dex_file, int advice) const { |
| 43 | DCHECK(dex_file != nullptr); |
| 44 | DCHECK_LT(start_offset_, dex_file->Size()); |
| 45 | DCHECK_LE(end_offset_, dex_file->Size()); |
| 46 | MadviseLargestPageAlignedRegion(dex_file->Begin() + start_offset_, |
| 47 | dex_file->Begin() + end_offset_, |
| 48 | advice); |
| 49 | } |
| 50 | |
| 51 | void DexLayoutSections::Madvise(const DexFile* dex_file, MadviseState state) const { |
| 52 | // The dex file is already defaulted to random access everywhere. |