/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/ |
H A D | zpool_trim_partial.ksh | 71 new_size=$(du -B1 "$LARGEFILE" | cut -f1) 72 log_must test $new_size -le $LARGESIZE 73 log_must test $new_size -gt $(( floor(LARGESIZE * 0.70) )) 83 new_size=$(du -B1 "$LARGEFILE" | cut -f1) 84 log_must test $new_size -gt $((4 * floor(LARGESIZE * 0.70) )) 97 new_size=$(du -B1 "$LARGEFILE" | cut -f1) 98 log_must test $new_size -gt $LARGESIZE 110 new_size=$(du -B1 "$LARGEFILE" | cut -f1) 111 log_must test $new_size -le $(( 2 * LARGESIZE)) 112 log_must test $new_size -gt $(( floor(LARGESIZE * 0.70) ))
|
H A D | zpool_trim_verify_trimmed.ksh | 69 new_size=$(du -B1 "$LARGEFILE" | cut -f1) 70 log_must within_tolerance $new_size $LARGESIZE $((128 * 1024 * 1024)) 78 new_size=$(du -B1 "$LARGEFILE" | cut -f1) 79 log_must within_tolerance $new_size $original_size $((128 * 1024 * 1024))
|
/freebsd/sys/netpfil/ipfw/ |
H A D | dn_heap.c | 78 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/sys/cam/ |
H A D | cam_queue.c | 85 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/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_allocator_dlsym.h | 56 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 D | sanitizer_allocator_combined.h | 97 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 D | tsan_stack_trace.cpp | 25 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 D | emutls.c | 358 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/contrib/llvm-project/compiler-rt/lib/dfsan/ |
H A D | dfsan_allocator.cpp | 154 void *DFsanReallocate(void *old_p, uptr new_size, uptr alignment) { in DFsanReallocate() argument 158 if (new_size <= actually_allocated_size) { in DFsanReallocate() 160 meta->requested_size = new_size; in DFsanReallocate() 161 if (new_size > old_size && flags().zero_in_malloc) in DFsanReallocate() 162 dfsan_set_label(0, (char *)old_p + old_size, new_size - old_size); in DFsanReallocate() 165 uptr memcpy_size = Min(new_size, old_size); in DFsanReallocate() 166 void *new_p = DFsanAllocate(new_size, alignment, false /*zeroise*/); in DFsanReallocate()
|
/freebsd/tests/sys/cddl/zfs/tests/snapshot/ |
H A D | snapshot_008_pos.ksh | 91 new_size=`get_prop available $TESTPOOL` 95 (( tolerance = new_size - orig_size)) 97 log_fail "Space not freed. ($orig_size != $new_size)"
|
/freebsd/usr.bin/netstat/ |
H A D | nhops.c | 204 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/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_expand/ |
H A D | zpool_expand_005_pos.ksh | 92 typeset new_size=$(get_pool_prop size $TESTPOOL1) 93 log_note "new pool size: $new_size" 94 if [[ $new_size -le $prev_size ]]; then
|
H A D | zpool_expand_001_pos.ksh | 90 typeset new_size=$(get_pool_prop size $TESTPOOL1) 93 if within_percent $new_size $exp_new_size 90 > /dev/null && \ 100 " free space (got $new_size with $new_free free space)"
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/snapshot/ |
H A D | snapshot_008_pos.ksh | 91 new_size=`get_prop available $TESTPOOL` 95 (( tolerance = new_size - orig_size)) 97 log_fail "Space not freed. ($orig_size != $new_size)"
|
/freebsd/contrib/llvm-project/lldb/source/Utility/ |
H A D | DataBufferHeap.cpp | 47 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/libcxx/src/ |
H A D | strstream.cpp | 112 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 D | sdp_rx.c | 253 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 D | kqueue.c | 250 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 D | kqueue.c | 250 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 D | lsan_allocator.cpp | 130 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 D | archive_entry_link_resolver.c | 401 size_t new_size; in grow_hash() local 405 new_size = res->number_buckets * 2; in grow_hash() 406 if (new_size < res->number_buckets) in grow_hash() 408 new_buckets = calloc(new_size, sizeof(struct links_entry *)); in grow_hash() 420 bucket = le->hash & (new_size - 1); in grow_hash() 431 res->number_buckets = new_size; in grow_hash()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/msan/ |
H A D | msan_allocator.cpp | 269 uptr new_size, uptr alignment) { in MsanReallocate() argument 273 if (new_size <= actually_allocated_size) { in MsanReallocate() 275 meta->requested_size = new_size; in MsanReallocate() 276 if (new_size > old_size) { in MsanReallocate() 279 PoisonMemory((char *)old_p + old_size, new_size - old_size, stack); in MsanReallocate() 284 uptr memcpy_size = Min(new_size, old_size); in MsanReallocate() 285 void *new_p = MsanAllocate(stack, new_size, alignment, false /*zeroise*/); in MsanReallocate()
|
/freebsd/usr.bin/du/ |
H A D | du.c | 384 size_t i, new_size; in linkchk() local 401 new_size = number_buckets * 2; in linkchk() 402 new_buckets = calloc(new_size, sizeof(struct links_entry *)); in linkchk() 411 new_buckets = calloc(new_size, sizeof(new_buckets[0])); in linkchk() 425 hash = (le->dev ^ le->ino) % new_size; in linkchk() 437 number_buckets = new_size; in linkchk()
|
/freebsd/sys/net/route/ |
H A D | nhop_utils.h | 41 uint32_t new_size = 0; in _cht_get_resize_size() local 44 new_size = head->hash_size * 2; in _cht_get_resize_size() 46 new_size = head->hash_size / 2; in _cht_get_resize_size() 48 return (new_size); in _cht_get_resize_size()
|
/freebsd/sys/netinet/ |
H A D | ip_id.c | 190 ip_initid(int new_size) in ip_initid() argument 195 new_array = malloc(new_size * sizeof(uint16_t), M_IPID, in ip_initid() 206 V_array_size = new_size; in ip_initid()
|