Searched refs:mmap_size (Results 1 – 8 of 8) sorted by relevance
/bionic/libc/bionic/ |
D | pthread_create.cpp | 216 size_t mmap_size; in __allocate_thread_mapping() local 217 if (__builtin_add_overflow(stack_size, stack_guard_size, &mmap_size)) return {}; in __allocate_thread_mapping() 218 if (__builtin_add_overflow(mmap_size, layout.size(), &mmap_size)) return {}; in __allocate_thread_mapping() 219 if (__builtin_add_overflow(mmap_size, PTHREAD_GUARD_SIZE, &mmap_size)) return {}; in __allocate_thread_mapping() 222 const size_t unaligned_size = mmap_size; in __allocate_thread_mapping() 223 mmap_size = __BIONIC_ALIGN(mmap_size, page_size()); in __allocate_thread_mapping() 224 if (mmap_size < unaligned_size) return {}; in __allocate_thread_mapping() 229 char* const space = static_cast<char*>(mmap(nullptr, mmap_size, PROT_NONE, flags, -1, 0)); in __allocate_thread_mapping() 233 mmap_size); in __allocate_thread_mapping() 236 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_exit.cpp | 141 if (old_state == THREAD_DETACHED && thread->mmap_size != 0) { in pthread_exit() 144 _exit_with_stack_teardown(thread->mmap_base, thread->mmap_size); in pthread_exit()
|
D | __libc_init_main_thread.cpp | 167 main_thread.mmap_size = mapping.mmap_size; in __libc_init_main_thread_final()
|
D | pthread_internal.h | 161 size_t mmap_size; variable 186 size_t mmap_size; member
|
D | pthread_internal.cpp | 76 if (thread->mmap_size != 0) { in __pthread_internal_free() 78 munmap(thread->mmap_base, thread->mmap_size); in __pthread_internal_free()
|
/bionic/linker/ |
D | linker_phdr.cpp | 608 size_t mmap_size = align_up(size, mapping_align) + mapping_align - page_size(); in ReserveWithAlignmentPadding() local 610 reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); 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() 625 mmap_size = align_up(size + gap_size, mapping_align) + mapping_align - page_size(); in ReserveWithAlignmentPadding() 626 mmap_ptr = reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); 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() 652 if (gap_end != mmap_ptr + mmap_size) { in ReserveWithAlignmentPadding() 653 munmap(gap_end, mmap_ptr + mmap_size - gap_end); in ReserveWithAlignmentPadding()
|
/bionic/tests/ |
D | struct_layout_test.cpp | 49 CHECK_OFFSET(pthread_internal_t, mmap_size, 176); in tests() 91 CHECK_OFFSET(pthread_internal_t, mmap_size, 96); in tests()
|