Lines Matching refs:mmap_ptr
527 void* mmap_ptr = mmap(nullptr, size, PROT_NONE, mmap_flags, -1, 0); in ReserveWithAlignmentPadding() local
528 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
531 return mmap_ptr; in ReserveWithAlignmentPadding()
546 uint8_t* mmap_ptr = in ReserveWithAlignmentPadding() local
548 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
552 size_t first_byte = reinterpret_cast<size_t>(align_up(mmap_ptr, align)); in ReserveWithAlignmentPadding()
553 size_t last_byte = reinterpret_cast<size_t>(align_down(mmap_ptr + mmap_size, align) - 1); in ReserveWithAlignmentPadding()
558 munmap(mmap_ptr, mmap_size); in ReserveWithAlignmentPadding()
563 mmap_ptr = reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); in ReserveWithAlignmentPadding()
564 if (mmap_ptr == MAP_FAILED) { in ReserveWithAlignmentPadding()
571 gap_end = align_down(mmap_ptr + mmap_size, kGapAlignment); in ReserveWithAlignmentPadding()
574 gap_start = gap_end = mmap_ptr + mmap_size; in ReserveWithAlignmentPadding()
577 uint8_t* first = align_up(mmap_ptr, align); in ReserveWithAlignmentPadding()
587 munmap(mmap_ptr, start - mmap_ptr); in ReserveWithAlignmentPadding()
589 if (gap_end != mmap_ptr + mmap_size) { in ReserveWithAlignmentPadding()
590 munmap(gap_end, mmap_ptr + mmap_size - gap_end); in ReserveWithAlignmentPadding()