Home
last modified time | relevance | path

Searched refs:mmap_size (Results 1 – 8 of 8) sorted by relevance

/bionic/libc/bionic/
Dpthread_create.cpp205 size_t mmap_size; in __allocate_thread_mapping() local
206 if (__builtin_add_overflow(stack_size, stack_guard_size, &mmap_size)) return {}; in __allocate_thread_mapping()
207 if (__builtin_add_overflow(mmap_size, layout.size(), &mmap_size)) return {}; in __allocate_thread_mapping()
208 if (__builtin_add_overflow(mmap_size, PTHREAD_GUARD_SIZE, &mmap_size)) return {}; in __allocate_thread_mapping()
211 const size_t unaligned_size = mmap_size; in __allocate_thread_mapping()
212 mmap_size = __BIONIC_ALIGN(mmap_size, PAGE_SIZE); in __allocate_thread_mapping()
213 if (mmap_size < unaligned_size) return {}; in __allocate_thread_mapping()
218 char* const space = static_cast<char*>(mmap(nullptr, mmap_size, PROT_NONE, flags, -1, 0)); in __allocate_thread_mapping()
223 mmap_size, strerror(errno)); in __allocate_thread_mapping()
226 const size_t writable_size = mmap_size - stack_guard_size - PTHREAD_GUARD_SIZE; in __allocate_thread_mapping()
[all …]
Dpthread_exit.cpp137 if (thread->mmap_size != 0) { in pthread_exit()
142 _exit_with_stack_teardown(thread->mmap_base, thread->mmap_size); in pthread_exit()
Dgrp_pwd_file.cpp241 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__libc_init_main_thread.cpp167 main_thread.mmap_size = mapping.mmap_size; in __libc_init_main_thread_final()
Dpthread_internal.cpp75 if (thread->mmap_size != 0) { in __pthread_internal_free()
77 munmap(thread->mmap_base, thread->mmap_size); in __pthread_internal_free()
Dpthread_internal.h143 size_t mmap_size; variable
167 size_t mmap_size; member
/bionic/linker/
Dlinker_phdr.cpp585 size_t mmap_size = align_up(size, mapping_align) + mapping_align - PAGE_SIZE; in ReserveWithAlignmentPadding() local
587 reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); 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()
602 mmap_size = align_up(size + gap_size, mapping_align) + mapping_align - PAGE_SIZE; in ReserveWithAlignmentPadding()
603 mmap_ptr = reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); 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()
629 if (gap_end != mmap_ptr + mmap_size) { in ReserveWithAlignmentPadding()
630 munmap(gap_end, mmap_ptr + mmap_size - gap_end); in ReserveWithAlignmentPadding()
/bionic/tests/
Dstruct_layout_test.cpp49 CHECK_OFFSET(pthread_internal_t, mmap_size, 176); in tests()
90 CHECK_OFFSET(pthread_internal_t, mmap_size, 96); in tests()