Lines Matching refs:mmap_ptr
590 void* mmap_ptr = mmap(nullptr, size, PROT_NONE, mmap_flags, -1, 0); in ReserveWithAlignmentPadding() local
591 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
594 return mmap_ptr; in ReserveWithAlignmentPadding()
609 uint8_t* mmap_ptr = in ReserveWithAlignmentPadding() local
611 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
615 size_t first_byte = reinterpret_cast<size_t>(align_up(mmap_ptr, mapping_align)); in ReserveWithAlignmentPadding()
616 size_t last_byte = reinterpret_cast<size_t>(align_down(mmap_ptr + mmap_size, mapping_align) - 1); in ReserveWithAlignmentPadding()
621 munmap(mmap_ptr, mmap_size); in ReserveWithAlignmentPadding()
626 mmap_ptr = reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); in ReserveWithAlignmentPadding()
627 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
634 gap_end = align_down(mmap_ptr + mmap_size, kGapAlignment); in ReserveWithAlignmentPadding()
637 gap_start = gap_end = mmap_ptr + mmap_size; in ReserveWithAlignmentPadding()
640 uint8_t* first = align_up(mmap_ptr, mapping_align); in ReserveWithAlignmentPadding()
650 munmap(mmap_ptr, start - mmap_ptr); in ReserveWithAlignmentPadding()
652 if (gap_end != mmap_ptr + mmap_size) { in ReserveWithAlignmentPadding()
653 munmap(gap_end, mmap_ptr + mmap_size - gap_end); in ReserveWithAlignmentPadding()