Home
last modified time | relevance | path

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

/bionic/libc/bionic/
Dpthread_create.cpp203 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 …]
Dpthread_internal.cpp72 if (thread->mmap_size != 0) { in __pthread_internal_free()
74 munmap(thread->mmap_base, thread->mmap_size); in __pthread_internal_free()
Dpthread_exit.cpp128 if (thread->mmap_size != 0) { in pthread_exit()
132 _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.cpp158 main_thread.mmap_size = mapping.mmap_size; in __libc_init_main_thread_final()
Dpthread_internal.h138 size_t mmap_size; variable
162 size_t mmap_size; member
/bionic/linker/
Dlinker_phdr.cpp535 size_t mmap_size = align_up(size, align) + align - PAGE_SIZE; in ReserveAligned() local
537 reinterpret_cast<uint8_t*>(mmap(nullptr, mmap_size, PROT_NONE, mmap_flags, -1, 0)); in ReserveAligned()
543 uint8_t* last = align_down(mmap_ptr + mmap_size, align) - size; in ReserveAligned()
550 munmap(start + size, mmap_ptr + mmap_size - (start + size)); in ReserveAligned()