Lines Matching refs:mmap_ptr
567 void* mmap_ptr = mmap(nullptr, size, PROT_NONE, mmap_flags, -1, 0); in ReserveWithAlignmentPadding() local
568 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
571 return mmap_ptr; in ReserveWithAlignmentPadding()
586 uint8_t* mmap_ptr = in ReserveWithAlignmentPadding() local
588 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
592 size_t first_byte = reinterpret_cast<size_t>(align_up(mmap_ptr, mapping_align)); in ReserveWithAlignmentPadding()
593 size_t last_byte = reinterpret_cast<size_t>(align_down(mmap_ptr + mmap_size, mapping_align) - 1); in ReserveWithAlignmentPadding()
598 munmap(mmap_ptr, mmap_size); in ReserveWithAlignmentPadding()
603 mmap_ptr = reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); in ReserveWithAlignmentPadding()
604 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
611 gap_end = align_down(mmap_ptr + mmap_size, kGapAlignment); in ReserveWithAlignmentPadding()
614 gap_start = gap_end = mmap_ptr + mmap_size; in ReserveWithAlignmentPadding()
617 uint8_t* first = align_up(mmap_ptr, mapping_align); in ReserveWithAlignmentPadding()
627 munmap(mmap_ptr, start - mmap_ptr); in ReserveWithAlignmentPadding()
629 if (gap_end != mmap_ptr + mmap_size) { in ReserveWithAlignmentPadding()
630 munmap(gap_end, mmap_ptr + mmap_size - gap_end); in ReserveWithAlignmentPadding()