Home
last modified time | relevance | path

Searched refs:new_size (Results 1 – 25 of 114) sorted by relevance

12345

/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/
H A Dzpool_trim_partial.ksh78 new_size=$(du -k "$LARGEFILE" | awk '{print $1 * 1024}')
79 log_must test $new_size -le $LARGESIZE
80 log_must test $new_size -gt $(( floor(LARGESIZE * 0.70) ))
90 new_size=$(du -k "$LARGEFILE" | awk '{print $1 * 1024}')
91 log_must test $new_size -gt $((4 * floor(LARGESIZE * 0.70) ))
103 new_size=$(du -k "$LARGEFILE" | awk '{print $1 * 1024}')
104 log_must test $new_size -gt $LARGESIZE
115 new_size=$(du -k "$LARGEFILE" | awk '{print $1 * 1024}')
116 log_must test $new_size -le $(( 2 * LARGESIZE))
117 log_must test $new_size -gt $(( floor(LARGESIZE * 0.70) ))
H A Dzpool_trim_verify_trimmed.ksh76 new_size=$(du -k "$LARGEFILE" | awk '{print $1 * 1024}')
77 log_must within_tolerance $new_size $LARGESIZE $((200 * 1024 * 1024))
85 new_size=$(du -k "$LARGEFILE" | awk '{print $1 * 1024}')
86 log_must within_tolerance $new_size $original_size $((128 * 1024 * 1024))
/freebsd/sys/cam/
H A Dcam_queue.c85 camq_resize(struct camq *queue, int new_size) in camq_resize() argument
89 KASSERT(new_size >= queue->entries, ("camq_resize: " in camq_resize()
91 new_size, queue->entries)); in camq_resize()
92 new_array = malloc((new_size + 1) * sizeof(cam_pinfo *), M_CAMQ, in camq_resize()
109 queue->array_size = new_size; in camq_resize()
254 cam_ccbq_resize(struct cam_ccbq *ccbq, int new_size) in cam_ccbq_resize() argument
258 delta = new_size - (ccbq->dev_active + ccbq->dev_openings); in cam_ccbq_resize()
262 new_size = imax(64, 1 << fls(new_size + new_size / 2)); in cam_ccbq_resize()
263 if (new_size > ccbq->queue.array_size) in cam_ccbq_resize()
264 return (camq_resize(&ccbq->queue, new_size)); in cam_ccbq_resize()
/freebsd/sys/netpfil/ipfw/
H A Ddn_heap.c78 heap_resize(struct dn_heap *h, unsigned int new_size) in heap_resize() argument
82 if ((unsigned int)h->size >= new_size ) /* have enough room */ in heap_resize()
85 new_size |= new_size >> 1; in heap_resize()
86 new_size |= new_size >> 2; in heap_resize()
87 new_size |= new_size >> 4; in heap_resize()
88 new_size |= new_size >> 8; in heap_resize()
89 new_size |= new_size >> 16; in heap_resize()
91 new_size = (new_size + HEAP_INCREMENT ) & ~HEAP_INCREMENT; in heap_resize()
93 p = mallocarray(new_size, sizeof(*p), M_DN_HEAP, M_NOWAIT); in heap_resize()
95 printf("--- %s, resize %d failed\n", __func__, new_size ); in heap_resize()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_allocator_dlsym.h56 static void *Realloc(void *ptr, uptr new_size) { in Realloc()
58 return Allocate(new_size); in Realloc()
60 if (!new_size) { in Realloc()
65 uptr memcpy_size = Min(new_size, size); in Realloc()
66 void *new_ptr = Allocate(new_size); in Realloc()
H A Dsanitizer_allocator_combined.h97 void *Reallocate(AllocatorCache *cache, void *p, uptr new_size, in Reallocate() argument
100 return Allocate(cache, new_size, alignment); in Reallocate()
101 if (!new_size) { in Reallocate()
107 uptr memcpy_size = Min(new_size, old_size); in Reallocate()
108 void *new_p = Allocate(cache, new_size, alignment); in Reallocate()
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_stack_trace.cpp25 void VarSizeStackTrace::ResizeBuffer(uptr new_size) { in ResizeBuffer() argument
27 trace_buffer = (new_size > 0) in ResizeBuffer()
28 ? (uptr *)Alloc(new_size * sizeof(trace_buffer[0])) in ResizeBuffer()
31 size = new_size; in ResizeBuffer()
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/
H A Demutls.c358 uintptr_t new_size = emutls_new_data_array_size(index); in emutls_get_address_array() local
359 array = (emutls_address_array *)malloc(emutls_asize(new_size)); in emutls_get_address_array()
361 memset(array->data, 0, new_size * sizeof(void *)); in emutls_get_address_array()
364 emutls_check_array_set_size(array, new_size); in emutls_get_address_array()
367 uintptr_t new_size = emutls_new_data_array_size(index); in emutls_get_address_array() local
368 array = (emutls_address_array *)realloc(array, emutls_asize(new_size)); in emutls_get_address_array()
371 (new_size - orig_size) * sizeof(void *)); in emutls_get_address_array()
372 emutls_check_array_set_size(array, new_size); in emutls_get_address_array()
/freebsd/tests/sys/cddl/zfs/tests/snapshot/
H A Dsnapshot_008_pos.ksh91 new_size=`get_prop available $TESTPOOL`
95 (( tolerance = new_size - orig_size))
97 log_fail "Space not freed. ($orig_size != $new_size)"
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_expand/
H A Dzpool_expand_005_pos.ksh93 typeset new_size=$(get_pool_prop size $TESTPOOL1)
94 log_note "new pool size: $new_size"
95 if [[ $new_size -le $prev_size ]]; then
H A Dzpool_expand_001_pos.ksh91 typeset new_size=$(get_pool_prop size $TESTPOOL1)
94 if within_percent $new_size $exp_new_size 90 > /dev/null && \
101 " free space (got $new_size with $new_free free space)"
/freebsd/usr.bin/netstat/
H A Dnhops.c204 uint32_t new_size; in nhop_map_update() local
207 new_size = 32; in nhop_map_update()
209 new_size = map->size * 2; in nhop_map_update()
210 if (new_size <= idx) in nhop_map_update()
211 new_size = roundup2(idx + 1, 32); in nhop_map_update()
213 sz = new_size * (sizeof(struct nhop_entry)); in nhop_map_update()
217 memset(&map->ptr[map->size], 0, (new_size - map->size) * sizeof(struct nhop_entry)); in nhop_map_update()
218 map->size = new_size; in nhop_map_update()
/freebsd/contrib/llvm-project/libc/src/__support/CPP/
H A Dstring.h154 const size_t new_size = size_ + rhs.size(); variable
155 reserve(new_size);
157 set_size_and_add_null_character(new_size);
162 const size_t new_size = size_ + 1; variable
163 reserve(new_size);
165 set_size_and_add_null_character(new_size);
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapshot/
H A Dsnapshot_008_pos.ksh92 new_size=`get_prop available $TESTPOOL`
96 (( tolerance = new_size - orig_size))
98 log_fail "Space not freed. ($orig_size != $new_size)"
/freebsd/usr.bin/mdo/
H A Dmdo.c116 size_t new_size; in alloc_realloc() local
120 new_size = ALLOC_FIRST_SIZE; in alloc_realloc()
122 new_size = 2 * old_size; in alloc_realloc()
128 new_size = roundup2(old_size, PAGE_SIZE) + PAGE_SIZE; in alloc_realloc()
130 alloc->start = realloc(alloc->start, new_size); in alloc_realloc()
134 old_size, new_size); in alloc_realloc()
135 alloc->size = new_size; in alloc_realloc()
380 const size_t new_size = new_nb * sizeof(*ga->groups); in realloc_groups() local
382 assert(new_nb >= diff && new_size >= new_nb); in realloc_groups()
383 ga->groups = realloc(ga->groups, new_size); in realloc_groups()
/freebsd/contrib/llvm-project/lldb/source/Utility/
H A DDataBufferHeap.cpp47 uint64_t DataBufferHeap::SetByteSize(uint64_t new_size) { in SetByteSize() argument
48 if (new_size < m_data.max_size()) in SetByteSize()
49 m_data.resize(new_size); in SetByteSize()
/freebsd/contrib/llvm-project/compiler-rt/lib/dfsan/
H A Ddfsan_allocator.cpp157 static void *DFsanReallocate(void *old_p, uptr new_size, uptr alignment) { in DFsanReallocate() argument
161 if (new_size <= actually_allocated_size) { in DFsanReallocate()
163 meta->requested_size = new_size; in DFsanReallocate()
164 if (new_size > old_size && flags().zero_in_malloc) in DFsanReallocate()
165 dfsan_set_label(0, (char *)old_p + old_size, new_size - old_size); in DFsanReallocate()
168 uptr memcpy_size = Min(new_size, old_size); in DFsanReallocate()
169 void *new_p = DFsanAllocate(new_size, alignment, false /*zeroise*/); in DFsanReallocate()
/freebsd/contrib/llvm-project/compiler-rt/lib/nsan/
H A Dnsan_allocator.cpp157 static void *NsanReallocate(void *ptr, uptr new_size, uptr alignment) { in NsanReallocate() argument
161 if (new_size <= actually_allocated_size) { in NsanReallocate()
163 meta->requested_size = new_size; in NsanReallocate()
164 if (new_size > old_size) in NsanReallocate()
165 __nsan_set_value_unknown((u8 *)ptr + old_size, new_size - old_size); in NsanReallocate()
168 void *new_p = NsanAllocate(new_size, alignment, false); in NsanReallocate()
170 uptr memcpy_size = Min(new_size, old_size); in NsanReallocate()
/freebsd/contrib/llvm-project/libcxx/src/
H A Dstrstream.cpp112 size_t new_size = max<size_t>(static_cast<size_t>(__alsize_), 2 * old_size); in ~strstreambuf()
113 if (new_size == 0) in ~strstreambuf()
114 new_size = __default_alsize; in ~strstreambuf()
117 buf = static_cast<char*>(__palloc_(new_size)); in ~strstreambuf()
119 buf = new char[new_size];
136 setp(buf + einp, buf + new_size); in freeze()
165 size_t new_size = max<size_t>(static_cast<size_t>(__alsize_), 2*old_size); overflow() local
/freebsd/sys/ofed/drivers/infiniband/ulp/sdp/
H A Dsdp_rx.c253 sdp_get_recv_bytes(struct sdp_sock *ssk, u32 new_size) in sdp_get_recv_bytes() argument
256 return MIN(new_size, SDP_MAX_PACKET); in sdp_get_recv_bytes()
260 sdp_init_buffers(struct sdp_sock *ssk, u32 new_size) in sdp_init_buffers() argument
263 ssk->recv_bytes = sdp_get_recv_bytes(ssk, new_size); in sdp_init_buffers()
270 sdp_resize_buffers(struct sdp_sock *ssk, u32 new_size) in sdp_resize_buffers() argument
275 if (new_size > curr_size && new_size <= max_size) { in sdp_resize_buffers()
276 ssk->recv_bytes = sdp_get_recv_bytes(ssk, new_size); in sdp_resize_buffers()
295 u32 new_size = ntohl(buf->size); in sdp_handle_resize_ack() local
297 if (new_size > ssk->xmit_size_goal) in sdp_handle_resize_ack()
298 ssk->xmit_size_goal = new_size; in sdp_handle_resize_ack()
/freebsd/contrib/ntp/sntp/libevent/
H A Dkqueue.c250 kq_grow_events(struct kqop *kqop, size_t new_size) in kq_grow_events() argument
255 new_size * sizeof(struct kevent)); in kq_grow_events()
259 kqop->events_size = new_size; in kq_grow_events()
304 int new_size = kqop->events_size; in kq_dispatch() local
306 new_size *= 2; in kq_dispatch()
307 } while (new_size < n_changes); in kq_dispatch()
309 kq_grow_events(kqop, new_size); in kq_dispatch()
/freebsd/contrib/libevent/
H A Dkqueue.c250 kq_grow_events(struct kqop *kqop, size_t new_size) in kq_grow_events() argument
255 new_size * sizeof(struct kevent)); in kq_grow_events()
259 kqop->events_size = new_size; in kq_grow_events()
304 int new_size = kqop->events_size; in kq_dispatch() local
306 new_size *= 2; in kq_dispatch()
307 } while (new_size < n_changes); in kq_dispatch()
309 kq_grow_events(kqop, new_size); in kq_dispatch()
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/
H A Dlsan_allocator.cpp130 void *Reallocate(const StackTrace &stack, void *p, uptr new_size, in Reallocate() argument
132 if (new_size > max_malloc_size) { in Reallocate()
133 ReportAllocationSizeTooBig(new_size, stack); in Reallocate()
138 allocator.Reallocate(GetAllocatorCache(), p, new_size, alignment); in Reallocate()
140 RegisterAllocation(stack, new_p, new_size); in Reallocate()
141 else if (new_size != 0) in Reallocate()
142 RegisterAllocation(stack, p, new_size); in Reallocate()
/freebsd/contrib/libarchive/libarchive/
H A Darchive_entry_link_resolver.c409 size_t new_size; in grow_hash() local
413 new_size = res->number_buckets * 2; in grow_hash()
414 if (new_size < res->number_buckets) in grow_hash()
416 new_buckets = calloc(new_size, sizeof(struct links_entry *)); in grow_hash()
428 bucket = le->hash & (new_size - 1); in grow_hash()
439 res->number_buckets = new_size; in grow_hash()
/freebsd/crypto/krb5/src/lib/kdb/
H A Dkdb_log.c169 extend_file_to(int fd, unsigned int new_size) in extend_file_to() argument
179 if (new_size > INT_MAX) in extend_file_to()
181 while (current_offset < (off_t)new_size) { in extend_file_to()
182 write_size = new_size - current_offset; in extend_file_to()
191 write_size = new_size - current_offset; in extend_file_to()
202 size_t old_block = ulog->kdb_block, new_block, new_size; in resize() local
210 new_size = sizeof(kdb_hlog_t); in resize()
213 new_size += ulogentries * new_block; in resize()
221 if (new_size > MAXLOGLEN) in resize()
225 retval = extend_file_to(ulogfd, new_size); in resize()

12345