Searched refs:ptr (Results 76 - 100 of 2045) sorted by relevance

1234567891011>>

/freebsd-current/tools/test/stress2/misc/
H A Dmmap20.sh62 char *ptr;
66 ptr = mmap(NULL, sz, PROT_READ, MAP_ANON, -1, 0);
67 if (ptr == NULL)
70 if (mlock(ptr, sz) != 0)
73 if (mprotect(ptr, sz, PROT_EXEC) != 0)
76 if (madvise(ptr, sz, MADV_WILLNEED) != 0)
79 if (munlock(ptr, sz) != 0)
/freebsd-current/contrib/libcbor/oss-fuzz/
H A Dcbor_load_fuzzer.cc27 void limited_free(void *ptr) { argument
28 if (ptr != NULL && allocated_len_map.find(ptr) == allocated_len_map.end()) {
31 free(ptr);
32 if (ptr != NULL) {
33 allocated_mem -= allocated_len_map[ptr];
34 allocated_len_map.erase(ptr);
38 void *limited_realloc(void *ptr, size_t size) { argument
39 if (ptr != NULL && allocated_len_map.find(ptr)
[all...]
/freebsd-current/sys/compat/linuxkpi/common/include/linux/
H A Drcupdate.h48 #define call_rcu(ptr, func) do { \
49 linux_call_rcu(RCU_TYPE_REGULAR, ptr, func); \
72 #define kfree_rcu(ptr, rcu_head) do { \
73 CTASSERT(offsetof(__typeof(*(ptr)), rcu_head) < \
75 call_rcu(&(ptr)->rcu_head, (rcu_callback_t)(uintptr_t) \
76 offsetof(__typeof(*(ptr)), rcu_head)); \
101 #define rcu_replace_pointer(rcu, ptr, c) \
103 typeof(ptr) __tmp = rcu_dereference_protected(rcu, c); \
104 rcu_assign_pointer(rcu, ptr); \
108 #define rcu_swap_protected(rcu, ptr,
[all...]
/freebsd-current/sys/contrib/openzfs/lib/libspl/include/
H A Dumem.h90 void *ptr = NULL; local
93 ptr = malloc(size);
94 } while (ptr == NULL && (flags & UMEM_NOFAIL));
96 return (ptr);
103 void *ptr = NULL; local
107 rc = posix_memalign(&ptr, align, size);
118 return (ptr);
125 void *ptr = NULL; local
127 ptr = umem_alloc(size, flags);
128 if (ptr)
135 umem_free(const void *ptr, size_t size __maybe_unused) argument
146 umem_free_aligned(void *ptr, size_t size __maybe_unused) argument
195 void *ptr = NULL; local
210 umem_cache_free(umem_cache_t *cp, void *ptr) argument
[all...]
/freebsd-current/sys/contrib/libnv/
H A Dnvpair_impl.h55 const unsigned char *nvpair_unpack(bool isbe, const unsigned char *ptr,
62 unsigned char *nvpair_pack_header(const nvpair_t *nvp, unsigned char *ptr,
64 unsigned char *nvpair_pack_null(const nvpair_t *nvp, unsigned char *ptr,
66 unsigned char *nvpair_pack_bool(const nvpair_t *nvp, unsigned char *ptr,
68 unsigned char *nvpair_pack_number(const nvpair_t *nvp, unsigned char *ptr,
70 unsigned char *nvpair_pack_string(const nvpair_t *nvp, unsigned char *ptr,
72 unsigned char *nvpair_pack_descriptor(const nvpair_t *nvp, unsigned char *ptr,
74 unsigned char *nvpair_pack_binary(const nvpair_t *nvp, unsigned char *ptr,
76 unsigned char *nvpair_pack_nvlist_up(unsigned char *ptr, size_t *leftp);
77 unsigned char *nvpair_pack_bool_array(const nvpair_t *nvp, unsigned char *ptr,
[all...]
/freebsd-current/contrib/sendmail/libsm/
H A Dheap.c104 void *ptr; local
107 ptr = malloc(MALLOC_SIZE(size));
109 if (ptr == NULL)
111 return ptr;
130 void *ptr; local
133 ptr = malloc(MALLOC_SIZE(size));
135 return ptr;
142 ** ptr -- pointer to old memory area.
150 sm_realloc(ptr, size)
151 void *ptr;
372 void *ptr; local
426 void *ptr; local
[all...]
/freebsd-current/contrib/llvm-project/compiler-rt/lib/scudo/standalone/
H A Dwrappers_cpp.cpp27 static void reportAllocation(void *ptr, size_t size) { argument
29 if (__scudo_allocate_hook && ptr)
30 __scudo_allocate_hook(ptr, size);
32 static void reportDeallocation(void *ptr) { argument
35 __scudo_deallocate_hook(ptr);
87 INTERFACE WEAK void operator delete(void *ptr) NOEXCEPT {
88 reportDeallocation(ptr); variable
89 Allocator.deallocate(ptr, scudo::Chunk::Origin::New);
91 INTERFACE WEAK void operator delete[](void *ptr) NOEXCEPT {
92 reportDeallocation(ptr); variable
97 reportDeallocation(ptr); variable
102 reportDeallocation(ptr); variable
106 reportDeallocation(ptr); variable
110 reportDeallocation(ptr); variable
115 reportDeallocation(ptr); variable
121 reportDeallocation(ptr); variable
127 reportDeallocation(ptr); variable
133 reportDeallocation(ptr); variable
139 reportDeallocation(ptr); variable
145 reportDeallocation(ptr); variable
[all...]
/freebsd-current/usr.sbin/bluetooth/bthidcontrol/
H A Dsdp.c251 uint8_t *ptr = a->value; local
255 if (end - ptr < 15)
259 SDP_GET8(type, ptr);
262 SDP_GET8(len, ptr);
266 SDP_GET16(len, ptr);
270 SDP_GET32(len, ptr);
276 if (ptr + len > end)
280 SDP_GET8(type, ptr);
283 SDP_GET8(len, ptr);
287 SDP_GET16(len, ptr);
359 uint8_t *ptr = a->value; local
[all...]
/freebsd-current/contrib/libfido2/openbsd-compat/
H A Dbsd-getline.c54 char *ptr, *eptr; local
63 for (ptr = *buf, eptr = *buf + *bufsiz;;) {
67 ssize_t diff = (ssize_t)(ptr - *buf);
69 *ptr = '\0';
75 *ptr++ = (char)c;
77 *ptr = '\0';
78 return ptr - *buf;
80 if (ptr + 2 >= eptr) {
83 ssize_t d = ptr - *buf;
89 ptr
[all...]
/freebsd-current/crypto/openssh/openbsd-compat/
H A Dbsd-getline.c52 char *ptr, *eptr; local
61 for (ptr = *buf, eptr = *buf + *bufsiz;;) {
65 ssize_t diff = (ssize_t)(ptr - *buf);
67 *ptr = '\0';
73 *ptr++ = c;
75 *ptr = '\0';
76 return ptr - *buf;
78 if (ptr + 2 >= eptr) {
81 ssize_t d = ptr - *buf;
87 ptr
[all...]
/freebsd-current/contrib/llvm-project/openmp/runtime/src/
H A Dkmp_wrapper_malloc.h46 void * ptr = malloc( size ); // All the memory leaks will be reported at
49 return ptr;
52 ptr = aligned_malloc( size ); // Memory leak will *not* be detected here. :-(
58 void * ptr = _malloc_dbg( size, file, line );
60 return ptr;
62 void * ptr = aligned_malloc( size, __FILE__, __LINE__ );
70 void * ptr = malloc_src_loc( size KMP_SRC_LOC_PARM );
72 return ptr;
77 void * ptr = aligned_malloc( size ); // Bingo! Memory leak will be
139 ptr
[all...]
/freebsd-current/contrib/libarchive/unzip/
H A Dla_getline.c54 char *ptr, *eptr; local
63 for (ptr = *buf, eptr = *buf + *bufsiz;;) {
67 ssize_t diff = (ssize_t)(ptr - *buf);
69 *ptr = '\0';
75 *ptr++ = c;
77 *ptr = '\0';
78 return ptr - *buf;
80 if (ptr + 2 >= eptr) {
83 ssize_t d = ptr - *buf;
89 ptr
[all...]
/freebsd-current/contrib/file/src/
H A Dgetline.c43 char *ptr, *eptr; local
52 for (ptr = *buf, eptr = *buf + *bufsiz;;) {
56 ssize_t diff = (ssize_t)(ptr - *buf);
58 *ptr = '\0';
64 *ptr++ = c;
66 *ptr = '\0';
67 return ptr - *buf;
69 if (ptr + 2 >= eptr) {
72 ssize_t d = ptr - *buf;
78 ptr
[all...]
/freebsd-current/usr.bin/diff/
H A Dxmalloc.c28 void *ptr; local
32 ptr = malloc(size);
33 if (ptr == NULL)
35 return ptr;
41 void *ptr; local
43 ptr = calloc(nmemb, size);
44 if (ptr == NULL)
46 return ptr;
50 xreallocarray(void *ptr, size_t nmemb, size_t size) argument
54 new_ptr = reallocarray(ptr, nmem
[all...]
/freebsd-current/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_new_delete.cpp40 if (ptr) \
41 hwasan_free(ptr, &stack)
50 # define OPERATOR_DELETE_BODY free(ptr)
80 void *ptr) NOEXCEPT {
84 void *ptr) NOEXCEPT {
88 void *ptr, std::nothrow_t const &) {
92 void *ptr, std::nothrow_t const &) {
96 void *ptr, size_t) NOEXCEPT {
100 void *ptr, size_t) NOEXCEPT {
130 void *ptr, st
87 operator delete( void *ptr, std::nothrow_t const &) argument
91 operator delete[]( void *ptr, std::nothrow_t const &) argument
[all...]
/freebsd-current/crypto/openssl/util/perl/TLSProxy/
H A DServerKeyExchange.pm54 my $ptr = 2;
55 my $p = substr($self->data, $ptr, $p_len);
56 $ptr += $p_len;
58 my $g_len = unpack('n', substr($self->data, $ptr));
59 $ptr += 2;
60 my $g = substr($self->data, $ptr, $g_len);
61 $ptr += $g_len;
63 my $pub_key_len = unpack('n', substr($self->data, $ptr));
64 $ptr += 2;
65 my $pub_key = substr($self->data, $ptr,
[all...]
/freebsd-current/sys/dev/mlx4/
H A Ddoorbell.h52 #define MLX4_INIT_DOORBELL_LOCK(ptr) do { } while (0)
53 #define MLX4_GET_DOORBELL_LOCK(ptr) (NULL)
70 #define MLX4_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr)
71 #define MLX4_GET_DOORBELL_LOCK(ptr) (ptr)
/freebsd-current/sys/dev/mlx5/
H A Ddoorbell.h39 #define MLX5_INIT_DOORBELL_LOCK(ptr) do { } while (0)
40 #define MLX5_GET_DOORBELL_LOCK(ptr) (NULL)
56 #define MLX5_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr)
57 #define MLX5_GET_DOORBELL_LOCK(ptr) (ptr)
/freebsd-current/contrib/llvm-project/libcxx/src/
H A Dnew.cpp104 _LIBCPP_WEAK void operator delete(void* ptr) noexcept { std::free(ptr); }
106 _LIBCPP_WEAK void operator delete(void* ptr, const std::nothrow_t&) noexcept { ::operator delete(ptr); } variable
108 _LIBCPP_WEAK void operator delete(void* ptr, size_t) noexcept { ::operator delete(ptr); } variable
110 _LIBCPP_WEAK void operator delete[](void* ptr) noexcept { ::operator delete(ptr); } variable
112 _LIBCPP_WEAK void operator delete[](void* ptr, const std::nothrow_t&) noexcept { ::operator delete[](ptr); } variable
114 _LIBCPP_WEAK void operator delete[](void* ptr, size_t) noexcept { ::operator delete[](ptr); } variable
[all...]
/freebsd-current/contrib/atf/atf-c++/detail/
H A Dauto_array.hpp45 auto_array_ref< T >::auto_array_ref(T* ptr) : argument
46 m_ptr(ptr)
73 auto_array< T >::auto_array(T* ptr) argument
75 m_ptr(ptr)
80 auto_array< T >::auto_array(auto_array< T >& ptr) argument
82 m_ptr(ptr.release())
122 T* ptr = m_ptr; local
124 return ptr;
129 auto_array< T >::reset(T* ptr) argument
134 m_ptr = ptr;
139 operator =(auto_array< T >& ptr) argument
[all...]
/freebsd-current/contrib/sendmail/include/sm/
H A Dheap.h33 # define sm_free(ptr) sm_free_tagged(ptr, __FILE__, __LINE__)
46 # define sm_free_tagged(ptr, file, line) sm_free(ptr)
47 # define sm_heap_register(ptr, size, file, line, grp) (true)
48 # define sm_heap_checkptr_tagged(ptr, tag, num) ((void)0)
59 # define sm_heap_checkptr(ptr) sm_heap_checkptr_tagged(ptr, __FILE__, __LINE__)
94 #define SM_FREE(ptr) \
97 if ((ptr) !
[all...]
/freebsd-current/sys/contrib/openzfs/include/os/linux/spl/sys/
H A Drandom.h31 random_get_bytes(uint8_t *ptr, size_t len) argument
33 get_random_bytes((void *)ptr, (int)len);
37 extern int random_get_pseudo_bytes(uint8_t *ptr, size_t len);
/freebsd-current/crypto/openssh/
H A Dxmalloc.c36 void *ptr; local
40 ptr = malloc(size);
41 if (ptr == NULL)
43 return ptr;
49 void *ptr; local
55 ptr = calloc(nmemb, size);
56 if (ptr == NULL)
59 return ptr;
63 xreallocarray(void *ptr, size_t nmemb, size_t size) argument
67 new_ptr = reallocarray(ptr, nmem
75 xrecallocarray(void *ptr, size_t onmemb, size_t nmemb, size_t size) argument
[all...]
/freebsd-current/sys/contrib/openzfs/lib/libspl/
H A Dgetexecname.c42 char *ptr = execname; local
51 ptr = NULL;
58 return (ptr);
/freebsd-current/usr.sbin/bluetooth/btpand/
H A Dsdp.c54 * _sdp_match_uuid16(ptr, limit, uuid)
56 * examine SDP data stream at ptr for a UUID, and return
61 _sdp_match_uuid16(uint8_t **ptr, uint8_t *limit, uint16_t uuid) argument
63 uint8_t *p = *ptr;
73 *ptr = p;
78 * _sdp_get_uuid(ptr, limit, uuid)
80 * examine SDP data stream at ptr for a UUID, and extract
81 * to given storage, advancing ptr.
85 _sdp_get_uuid(uint8_t **ptr, uint8_t *limit, uuid_t *uuid) argument
87 uint8_t *p = *ptr;
135 _sdp_get_seq(uint8_t **ptr, uint8_t *limit, uint8_t **seq) argument
187 _sdp_get_uint16(uint8_t **ptr, uint8_t *limit, uint16_t *value) argument
[all...]

Completed in 244 milliseconds

1234567891011>>