Searched refs:ptr (Results 1 - 25 of 84) sorted by relevance

1234

/bionic/libc/arch-arm/bionic/
H A Datomics_arm.c61 __atomic_cmpxchg(int old, int _new, volatile int *ptr) argument
64 return __sync_val_compare_and_swap(ptr, old, _new) != old;
68 __atomic_swap(int _new, volatile int *ptr) argument
72 prev = *ptr;
73 } while (__sync_val_compare_and_swap(ptr, prev, _new) != prev);
78 __atomic_dec(volatile int *ptr) argument
80 return __sync_fetch_and_sub (ptr, 1);
84 __atomic_inc(volatile int *ptr) argument
86 return __sync_fetch_and_add (ptr, 1);
/bionic/libc/bionic/
H A D__cmsg_nxthdr.cpp32 cmsghdr* ptr; local
33 ptr = reinterpret_cast<cmsghdr*>(reinterpret_cast<char*>(cmsg) + CMSG_ALIGN(cmsg->cmsg_len));
34 size_t len = reinterpret_cast<char*>(ptr+1) - reinterpret_cast<char*>(msg->msg_control);
38 return ptr;
H A Dnew.cpp42 void operator delete(void* ptr) throw() { argument
43 free(ptr);
46 void operator delete[](void* ptr) throw() { argument
47 free(ptr);
58 void operator delete(void* ptr, const std::nothrow_t&) throw() { argument
59 free(ptr);
62 void operator delete[](void* ptr, const std::nothrow_t&) throw() { argument
63 free(ptr);
/bionic/tests/
H A Dmalloc_test.cpp31 void *ptr = malloc(100); local
32 ASSERT_TRUE(ptr != NULL);
33 ASSERT_LE(100U, malloc_usable_size(ptr));
34 free(ptr);
46 char *ptr = (char *)calloc(1, alloc_len); local
47 ASSERT_TRUE(ptr != NULL);
48 ASSERT_LE(alloc_len, malloc_usable_size(ptr));
50 ASSERT_EQ(0, ptr[i]);
52 free(ptr);
80 char *ptr local
95 void* ptr; local
106 char *ptr = (char*)memalign(alignment, 100); local
141 char *ptr = (char *)malloc(100); local
157 char *ptr = (char *)malloc(200); local
173 char *ptr = (char *)malloc(200); local
211 char *ptr = (char *)calloc(1, 100); local
226 char *ptr = (char *)calloc(1, 200); local
241 char *ptr = (char *)calloc(1, 200); local
280 void* ptr = malloc(100); local
294 void* ptr = pvalloc(100); local
307 void* ptr = pvalloc(100); local
[all...]
/bionic/libc/arch-x86_64/bionic/
H A D__set_tls.c35 __LIBC_HIDDEN__ int __set_tls(void* ptr) { argument
36 return __arch_prctl(ARCH_SET_FS, (uintptr_t) ptr);
/bionic/tests/libs/
H A Ddlopen_nodelete_1.cpp23 extern "C" void dlopen_nodelete_1_set_unload_flag_ptr(bool* ptr) { argument
24 unload_flag_ptr = ptr;
H A Ddlopen_nodelete_2.cpp23 extern "C" void dlopen_nodelete_2_set_unload_flag_ptr(bool* ptr) { argument
24 unload_flag_ptr = ptr;
H A Ddlopen_nodelete_dt_flags_1.cpp22 extern "C" void dlopen_nodelete_dt_flags_1_set_unload_flag_ptr(bool* ptr) { argument
23 unload_flag_ptr = ptr;
/bionic/libc/upstream-netbsd/lib/libc/stdlib/
H A Dreallocarr.c57 reallocarr(void *ptr, size_t number, size_t size)
64 memcpy(&optr, ptr, sizeof(ptr));
68 memcpy(ptr, &nptr, sizeof(ptr));
90 memcpy(ptr, &nptr, sizeof(ptr));
/bionic/libc/malloc_hooks/tests/
H A Dmalloc_hooks_tests.cpp113 static void* test_realloc_hook(void* ptr, size_t, const void*);
161 void* MallocHooksTest::test_realloc_hook(void* ptr, size_t size, const void* arg) { argument
164 return orig_realloc_hook_(ptr, size, arg);
173 void MallocHooksTest::test_free_hook(void* ptr, const void* arg) { argument
176 return orig_free_hook_(ptr, arg);
190 void* ptr = malloc(1024); local
191 EXPECT_LE(1024U, malloc_usable_size(ptr));
192 free(ptr);
232 void* ptr = malloc(1024); local
233 ASSERT_TRUE(ptr !
250 void* ptr = malloc(1024); local
268 void* ptr = malloc(1024); local
287 void* ptr = memalign(32, 1024); local
305 void* ptr; local
324 void* ptr; local
343 void* ptr = aligned_alloc(32, 1024); local
361 void* ptr = aligned_alloc(11, 1024); local
384 void* ptr = pvalloc(1024); local
404 void* ptr = valloc(1024); local
[all...]
/bionic/libc/dns/include/
H A Dhostent.h67 #define HENT_ARRAY(dst, anum, ptr, len) \
72 dst = (void *)ptr; \
73 ptr += _len; \
77 #define HENT_COPY(dst, src, slen, ptr, len) \
81 memcpy(ptr, src, (size_t)slen); \
82 dst = ptr; \
83 ptr += slen; \
87 #define HENT_SCOPY(dst, src, ptr, len) \
90 HENT_COPY(dst, src, _len, ptr, len); \
/bionic/linker/
H A Dlinker_allocator.cpp148 void LinkerSmallObjectAllocator::free(void* ptr) { argument
149 auto page_record = find_page_record(ptr);
151 ssize_t offset = reinterpret_cast<uintptr_t>(ptr) - sizeof(page_info);
154 async_safe_fatal("invalid pointer: %p (block_size=%zd)", ptr, block_size_);
157 memset(ptr, 0, block_size_);
158 small_object_block_record* block_record = reinterpret_cast<small_object_block_record*>(ptr);
176 linker_vector_t::iterator LinkerSmallObjectAllocator::find_page_record(void* ptr) { argument
177 void* addr = reinterpret_cast<void*>(PAGE_START(reinterpret_cast<uintptr_t>(ptr)));
185 async_safe_fatal("page record for %p was not found (block_size=%zd)", ptr, block_size_);
283 page_info* LinkerMemoryAllocator::get_page_info(void* ptr) { argument
292 realloc(void* ptr, size_t size) argument
327 free(void* ptr) argument
[all...]
H A Dlinker_allocator.h91 void* ptr = mmap(const_cast<T*>(hint), size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, local
93 if (ptr == MAP_FAILED) {
99 prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ptr, size, "linker_alloc_vector");
101 return reinterpret_cast<T*>(ptr);
104 void deallocate(T* ptr, size_t n) { argument
105 munmap(ptr, n * sizeof(T));
118 void free(void* ptr);
124 linker_vector_t::iterator find_page_record(void* ptr);
143 void* realloc(void* ptr, size_t size);
144 void free(void* ptr);
[all...]
H A Dlinker_memory.cpp83 void free(void* ptr) { argument
84 get_allocator().free(ptr);
/bionic/benchmarks/
H A Dutil.cpp36 uintptr_t ptr = reinterpret_cast<uintptr_t>(orig_ptr); local
41 ptr += alignment - (ptr & (alignment - 1));
42 ptr |= alignment | or_mask;
45 return reinterpret_cast<char*>(ptr);
/bionic/libc/kernel/uapi/linux/mmc/
H A Dioctl.h38 #define mmc_ioc_cmd_set_data(ic,ptr) ic.data_ptr = (__u64) (unsigned long) ptr
/bionic/libc/versioner-dependencies/common/kernel_uapi/linux/mmc/
H A Dioctl.h38 #define mmc_ioc_cmd_set_data(ic,ptr) ic.data_ptr = (__u64) (unsigned long) ptr
/bionic/tools/versioner/dependencies/common/kernel_uapi/linux/mmc/
H A Dioctl.h38 #define mmc_ioc_cmd_set_data(ic,ptr) ic.data_ptr = (__u64) (unsigned long) ptr
/bionic/libc/include/bits/
H A Depoll_event.h36 void* ptr; member in union:epoll_data
/bionic/tools/versioner/current/bits/
H A Depoll_event.h36 void* ptr; member in union:epoll_data
/bionic/libc/dns/net/
H A Dsethostent.c145 char *buf, *ptr; local
161 if ((ptr = buf = malloc(len = info->buflen)) == NULL) {
196 HENT_SCOPY(hent.h_name, hp->h_name, ptr, len);
201 ptr, len);
203 ptr = (void *)ALIGN(ptr);
204 if ((size_t)(ptr - buf) >= info->buflen)
210 HENT_COPY(addr_ptrs[num], hp->h_addr_list[0], hp->h_length, ptr,
223 ptr = info->buf;
229 HENT_ARRAY(hp->h_aliases, anum, ptr, le
[all...]
/bionic/libc/arch-x86/bionic/
H A D__set_tls.cpp59 extern "C" __LIBC_HIDDEN__ int __set_tls(void* ptr) { argument
61 __init_user_desc(&tls_descriptor, true, ptr);
/bionic/tests/headers/posix/
H A Dheader_checks.h35 #define STRUCT_MEMBER(s_, t_, n_) { s_ s; t_* ptr = &(s.n_); }
36 #define STRUCT_MEMBER_ARRAY(s_, t_, n_) { s_ s; t_* ptr = &(s.n_[0]); }
/bionic/libc/upstream-netbsd/lib/libc/regex/
H A Dregex2.h158 uch *ptr; /* -> uch [csetsize] */ member in struct:__anon1252
165 #define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
166 #define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
167 #define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
/bionic/libc/dns/nameser/
H A Dns_parse.c82 ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) { argument
83 const u_char *optr = ptr;
88 b = dn_skipname(ptr, eom);
91 ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/;
93 if (ptr + NS_INT32SZ + NS_INT16SZ > eom)
95 ptr += NS_INT32SZ/*TTL*/;
96 NS_GET16(rdlength, ptr);
97 ptr += rdlength/*RData*/;
100 if (ptr > eom)
102 _DIAGASSERT(__type_fit(int, ptr
[all...]

Completed in 352 milliseconds

1234