/bionic/linker/ |
H A D | linker.cpp | 317 if (si->base != 0 && si->size != 0) { 318 munmap(reinterpret_cast<void*>(si->base), si->size); 402 if ((addr >= si->base) && (addr < (si->base + si->size))) { 415 int dl_iterate_phdr(int (*cb)(dl_phdr_info* info, size_t size, void* data), void* data) { argument 678 if (address >= si->base && address - si->base < si->size) { 792 si->size = elf_reader.load_size(); 799 TRACE("[ load_library base=%p size=%zu name='%s' ]", 800 reinterpret_cast<void*>(si->base), si->size, si->name); 888 // snprintf indirectly calls pthread_getspecific to get the size of a buffer. 1454 TRACE("[ Calling %s (size [all...] |
H A D | linker.h | 120 size_t size; member in struct:soinfo
|
H A D | linker_phdr.cpp | 51 p_filesz -> segment file size 52 p_memsz -> segment memory size (always >= p_filesz) 239 /* Returns the size of the extent of all the possibly non-contiguous 241 * to the page-aligned size in bytes that needs to be reserved in the 548 ssize_t size = seg_page_end - seg_page_start; variable 550 ssize_t written = TEMP_FAILURE_RETRY(write(fd, reinterpret_cast<void*>(seg_page_start), size)); 551 if (written != size) { 554 void* map = mmap(reinterpret_cast<void*>(seg_page_start), size, PROT_READ, 559 file_offset += size; 612 size_t size variable [all...] |
/bionic/tests/ |
H A D | fortify_test.cpp | 165 size_t size = atoi("11"); local 168 result = vsnprintf(myfoo.a, size, fmt, va); // should crash here 561 size_t size = atoi("11"); local 564 result = vsnprintf(buf, size, fmt, va); // should crash here
|
H A D | sched_test.cpp | 161 size_t size = CPU_ALLOC_SIZE(17); local 163 CPU_ZERO_S(size, set); 164 ASSERT_EQ(0, CPU_COUNT_S(size, set)); 165 CPU_SET_S(16, size, set); 166 ASSERT_TRUE(CPU_ISSET_S(16, size, set)); 173 size_t size = CPU_ALLOC_SIZE(10 * CPU_SETSIZE); local 175 CPU_ZERO_S(size, set); 176 ASSERT_EQ(0, CPU_COUNT_S(size, set)); 177 CPU_SET_S(CPU_SETSIZE, size, set); 178 ASSERT_TRUE(CPU_ISSET_S(CPU_SETSIZE, size, se 185 size_t size = CPU_ALLOC_SIZE(set_size); local [all...] |
H A D | string_test.cpp | 641 // Choose a random size for our src buffer. 680 // Choose a random size for our src buffer. 937 static void verify_memmove(char* src_copy, char* dst, char* src, size_t size) { argument 938 memset(dst, 0, size); 939 memcpy(src, src_copy, size); 940 ASSERT_EQ(dst, memmove(dst, src, size)); 941 ASSERT_EQ(0, memcmp(dst, src_copy, size)); 972 // Check all leftover size offsets between 1 and 127 inclusive. 975 for (size_t size = 1; size < 12 [all...] |
/bionic/libc/bionic/ |
H A D | dl_iterate_phdr_static.cpp | 38 int dl_iterate_phdr(int (*cb)(struct dl_phdr_info* info, size_t size, void* data), void* data) { argument
|
H A D | getcwd.cpp | 32 extern "C" int __getcwd(char* buf, size_t size); 34 char* getcwd(char* buf, size_t size) { argument 35 // You can't specify size 0 unless you're asking us to allocate for you. 36 if (buf != NULL && size == 0) { 43 size_t allocated_size = size; 45 if (size == 0) { 46 // The Linux kernel won't return more than a page, so translate size 0 to 4KiB. 68 if (size == 0) {
|
H A D | getentropy_linux.c | 88 static int getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data); 345 getentropy_phdr(struct dl_phdr_info *info, size_t size, void *data) argument
|
H A D | jemalloc_wrapper.cpp | 25 size_t size = BIONIC_ALIGN(bytes, pagesize); local 26 if (size < bytes) { 29 return je_memalign(pagesize, size); 39 void* je_memalign_round_up_boundary(size_t boundary, size_t size) { argument 47 return je_memalign(boundary, size);
|
H A D | libc_logging.cpp | 63 BufferOutputStream(char* buffer, size_t size) : total(0) { argument 65 end_ = buffer + size - 1; 157 // Writes number 'value' in base 'base' into buffer 'buf' of size 'buf_size' bytes. 665 size_t size = sizeof(abort_msg_t) + strlen(msg) + 1; local 666 void* map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); 672 // stop storing the size. 674 munmap(*__abort_message_ptr, (*__abort_message_ptr)->size); 677 new_abort_message->size = size;
|
H A D | malloc_debug_check.cpp | 86 size_t size; member in struct:hdr_t 95 return reinterpret_cast<ftr_t*>(reinterpret_cast<char*>(hdr + 1) + hdr->size); 124 // It determines the size of the backlog we use to detect multiple frees. 197 static inline void add(hdr_t* hdr, size_t size) { argument 200 hdr->size = size; 219 memset(user(hdr), FREE_POISON, hdr->size); 224 for (size_t i = 0; i < hdr->size; i++) { 238 user(hdr), hdr->size); 250 user(hdr), hdr->size); 344 size_t size = sizeof(hdr_t) + bytes + sizeof(ftr_t); local 376 size_t size = (alignment-MALLOC_ALIGNMENT) + bytes; local 497 size_t size = sizeof(hdr_t) + bytes + sizeof(ftr_t); local 531 size_t size = sizeof(hdr_t) + total_bytes + sizeof(ftr_t); local 566 chk_posix_memalign(void** memptr, size_t alignment, size_t size) argument 587 size_t size = BIONIC_ALIGN(bytes, pagesize); local 594 chk_valloc(size_t size) argument [all...] |
H A D | malloc_debug_common.cpp | 133 size_t size1 = e1->size & ~SIZE_FLAG_MASK; 134 size_t size2 = e2->size & ~SIZE_FLAG_MASK; 139 // 1) total size 164 // "*overallSize" is set to the size of the "info" buffer 165 // "*infoSize" is set to the size of a single entry 199 *totalMemory = *totalMemory + ((entry->size & ~SIZE_FLAG_MASK) * entry->allocations); 205 // XXX: the protocol doesn't allow variable size for the stack trace (yet) 232 memcpy(head, &(entry->size), entrySize); 270 extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size) { argument 271 return __libc_malloc_dispatch->posix_memalign(memptr, alignment, size); [all...] |
H A D | malloc_debug_common.h | 45 /* flag definitions, currently sharing storage with "size" */ 63 // fields above "size" are NOT sent to the host 64 size_t size; member in struct:HashEntry
|
H A D | malloc_debug_leak.cpp | 110 uintptr_t* backtrace, size_t numEntries, size_t size) { 116 * See if the entry matches exactly. We compare the "size" field, 119 if (entry->size == size && entry->numEntries == numEntries && 130 static HashEntry* record_backtrace(uintptr_t* backtrace, size_t numEntries, size_t size) { argument 134 if (size & SIZE_FLAG_MASK) { 135 debug_log("malloc_debug: allocation %zx exceeds bit width\n", size); 140 size |= SIZE_FLAG_ZYGOTE_CHILD; 143 HashEntry* entry = find_entry(g_hash_table, slot, backtrace, numEntries, size); 158 entry->size 109 find_entry(HashTable* table, int slot, uintptr_t* backtrace, size_t numEntries, size_t size) argument 262 fill_posix_memalign(void** memptr, size_t alignment, size_t size) argument 275 size_t size = BIONIC_ALIGN(bytes, pagesize); local 282 fill_valloc(size_t size) argument 304 size_t size = bytes + sizeof(AllocationEntry); local 380 size_t size = n_elements * elem_size; local 468 size_t size = (alignment-MALLOC_ALIGNMENT) + bytes; local 499 leak_posix_memalign(void** memptr, size_t alignment, size_t size) argument 520 size_t size = BIONIC_ALIGN(bytes, pagesize); local 527 leak_valloc(size_t size) argument [all...] |
H A D | malloc_debug_qemu.cpp | 94 /* Byte size of the prefix data. Actual pointer returned to the malloc's 100 /* Byte size of the suffix data. */ 239 /* Defines default size of allocation prefix. 244 /* Defines default size of allocation suffix. 375 /* Gets size of memory block actually allocated from the heap for the given 694 size_t size = mallocdesc_alloc_size(&desc); local 695 if (size < bytes) { // Overflow 701 desc.ptr = g_malloc_dispatch->malloc(size); 704 malloc_pid, getpid(), bytes, size); 791 /* Calculating prefix size [all...] |
H A D | mmap.cpp | 42 void* mmap64(void* addr, size_t size, int prot, int flags, int fd, off64_t offset) { argument 49 void* result = __mmap2(addr, size, prot, flags, fd, offset >> MMAP2_SHIFT); 53 int rc = madvise(result, size, MADV_MERGEABLE); 62 void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset) { argument 63 return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset));
|
H A D | ndk_cruft.cpp | 325 extern "C" void* dlmalloc(size_t size) { argument 326 return malloc(size);
|
H A D | new.cpp | 25 void* operator new(std::size_t size) { argument 26 void* p = malloc(size); 28 __libc_fatal("new failed to allocate %zu bytes", size); 33 void* operator new[](std::size_t size) { argument 34 void* p = malloc(size); 36 __libc_fatal("new[] failed to allocate %zu bytes", size); 49 void* operator new(std::size_t size, const std::nothrow_t&) { argument 50 return malloc(size); 53 void* operator new[](std::size_t size, const std::nothrow_t&) { argument 54 return malloc(size); [all...] |
H A D | readlink.cpp | 33 ssize_t readlink(const char* path, char* buf, size_t size) { argument 34 return readlinkat(AT_FDCWD, path, buf, size);
|
H A D | scandir.cpp | 38 size_t size() { function in class:ScandirResult 82 size_t size = ((original->d_reclen + 3) & ~3); local 83 dirent* copy = (dirent*) malloc(size); 111 size_t size = names.size(); local 113 return size;
|
H A D | system_properties.cpp | 162 // and the second is the size of the system properties area. The 163 // size is currently unused. 298 static void *allocate_obj(const size_t size, uint32_t *const off) argument 301 const size_t aligned = BIONIC_ALIGN(size, sizeof(uint32_t));
|
/bionic/libc/dns/ |
H A D | gethnamaddr.c | 422 dprintf("size (%d) too big\n", res, n); 564 uint32_t size; local 572 fread(&size, 1, sizeof(size), proxy); 576 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL; 577 size = ntohl(size); 582 if (fread(ptr, 1, size, prox 630 int size; local 826 socklen_t size; local [all...] |
/bionic/libc/dns/resolv/ |
H A D | res_cache.c | 139 /* name of the system property that can be used to set the cache size */ 401 * RDLENGTH: 16 : size of RDDATA in bytes 1160 int size; local 1162 size = sizeof(*e) + init->querylen + answerlen; 1163 e = calloc(size, 1); 1398 XLOG("cache size: %d", cache_size);
|
H A D | res_debug.c | 735 p_sockun(union res_sockaddr_union u, char *buf, size_t size) { argument 751 if (size > 0U) { 752 strncpy(buf, ret, size - 1); 753 buf[size - 1] = '0'; 767 /* takes an XeY precision/size value, returns a string representation. */ 784 /* converts ascii size/precision X * 10**Y(cm) to 0xXY. moves pointer. */ 1026 return (16); /* size of RR in octets */
|