Searched refs:mmap_size (Results 1 – 7 of 7) sorted by relevance
/bionic/libc/bionic/ |
D | pthread_create.cpp | 203 size_t mmap_size; in __allocate_thread_mapping() local 204 if (__builtin_add_overflow(stack_size, stack_guard_size, &mmap_size)) return {}; in __allocate_thread_mapping() 205 if (__builtin_add_overflow(mmap_size, layout.size(), &mmap_size)) return {}; in __allocate_thread_mapping() 206 if (__builtin_add_overflow(mmap_size, PTHREAD_GUARD_SIZE, &mmap_size)) return {}; in __allocate_thread_mapping() 209 const size_t unaligned_size = mmap_size; in __allocate_thread_mapping() 210 mmap_size = __BIONIC_ALIGN(mmap_size, PAGE_SIZE); in __allocate_thread_mapping() 211 if (mmap_size < unaligned_size) return {}; in __allocate_thread_mapping() 216 char* const space = static_cast<char*>(mmap(nullptr, mmap_size, PROT_NONE, flags, -1, 0)); in __allocate_thread_mapping() 221 mmap_size, strerror(errno)); in __allocate_thread_mapping() 224 const size_t writable_size = mmap_size - stack_guard_size - PTHREAD_GUARD_SIZE; in __allocate_thread_mapping() [all …]
|
D | grp_pwd_file.cpp | 241 auto mmap_size = fd_stat.st_size; in DoMmap() local 243 void* map_result = mmap(nullptr, mmap_size, PROT_READ, MAP_SHARED, fd.get(), 0); in DoMmap() 249 end_ = start_ + mmap_size - 1; in DoMmap() 252 munmap(map_result, mmap_size); in DoMmap()
|
D | pthread_internal.cpp | 72 if (thread->mmap_size != 0) { in __pthread_internal_free() 74 munmap(thread->mmap_base, thread->mmap_size); in __pthread_internal_free()
|
D | pthread_exit.cpp | 128 if (thread->mmap_size != 0) { in pthread_exit() 132 _exit_with_stack_teardown(thread->mmap_base, thread->mmap_size); in pthread_exit()
|
D | __libc_init_main_thread.cpp | 158 main_thread.mmap_size = mapping.mmap_size; in __libc_init_main_thread_final()
|
D | pthread_internal.h | 138 size_t mmap_size; variable 162 size_t mmap_size; member
|
/bionic/linker/ |
D | linker_phdr.cpp | 545 size_t mmap_size = align_up(size, align) + align - PAGE_SIZE; in ReserveWithAlignmentPadding() local 547 reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); 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() 562 mmap_size = align_up(size + gap_size, align) + align - PAGE_SIZE; in ReserveWithAlignmentPadding() 563 mmap_ptr = reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); 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() 589 if (gap_end != mmap_ptr + mmap_size) { in ReserveWithAlignmentPadding() 590 munmap(gap_end, mmap_ptr + mmap_size - gap_end); in ReserveWithAlignmentPadding()
|