Home
last modified time | relevance | path

Searched refs:capacity (Results 1 – 25 of 222) sorted by relevance

123456789

/freebsd-12-stable/sys/contrib/zstd/tests/fuzz/
Dstream_round_trip.c31 static ZSTD_outBuffer makeOutBuffer(uint8_t *dst, size_t capacity) in makeOutBuffer() argument
35 FUZZ_ASSERT(capacity > 0); in makeOutBuffer()
36 buffer.size = (FUZZ_rand(&seed) % capacity) + 1; in makeOutBuffer()
37 FUZZ_ASSERT(buffer.size <= capacity); in makeOutBuffer()
55 static size_t compress(uint8_t *dst, size_t capacity, in compress() argument
67 ZSTD_outBuffer out = makeOutBuffer(dst, capacity); in compress()
105 capacity -= out.pos; in compress()
110 ZSTD_outBuffer out = makeOutBuffer(dst, capacity); in compress()
116 capacity -= out.pos; in compress()
/freebsd-12-stable/sys/dev/bhnd/nvram/
Dbhnd_nvram_iobuf.c61 size_t capacity; /**< capacity of @p buf */ member
87 bhnd_nvram_iobuf_empty(size_t size, size_t capacity) in BHND_NVRAM_IOPS_DEFN()
94 if (size > capacity) in BHND_NVRAM_IOPS_DEFN()
98 if (SIZE_MAX - sizeof(*iobuf) < capacity) { in BHND_NVRAM_IOPS_DEFN()
103 iosz = sizeof(*iobuf) + capacity; in BHND_NVRAM_IOPS_DEFN()
114 iobuf->capacity = capacity; in BHND_NVRAM_IOPS_DEFN()
121 iobuf->buf = bhnd_nv_malloc(iobuf->capacity); in BHND_NVRAM_IOPS_DEFN()
248 if (size > iobuf->capacity) in bhnd_nvram_iobuf_setsize()
Dbhnd_nvram_ioptr.c60 size_t capacity; /**< capacity at @p ptr */ member
85 bhnd_nvram_ioptr_new(const void *ptr, size_t size, size_t capacity, in BHND_NVRAM_IOPS_DEFN()
91 if (size > capacity) in BHND_NVRAM_IOPS_DEFN()
102 ioptr->capacity = capacity; in BHND_NVRAM_IOPS_DEFN()
131 if (size > ioptr->capacity) in bhnd_nvram_ioptr_setsize()
/freebsd-12-stable/sys/contrib/ck/src/
Dck_hs.c91 unsigned long capacity; member
112 if (i->offset >= map->capacity) in _ck_hs_next()
128 } while (++i->offset < map->capacity); in _ck_hs_next()
225 map->capacity = n_entries; in ck_hs_map_create()
250 ck_hs_reset_size(struct ck_hs *hs, unsigned long capacity) in ck_hs_reset_size() argument
255 map = ck_hs_map_create(hs, capacity); in ck_hs_reset_size()
270 return ck_hs_reset_size(hs, previous->capacity); in ck_hs_reset()
329 unsigned long capacity) in ck_hs_grow() argument
337 if (map->capacity > capacity) in ck_hs_grow()
340 update = ck_hs_map_create(hs, capacity); in ck_hs_grow()
[all …]
Dck_ht.c91 CK_HT_TYPE capacity; member
173 map->capacity = n_entries; in ck_ht_map_create()
174 map->step = ck_cc_ffsll(map->capacity); in ck_ht_map_create()
175 map->mask = map->capacity - 1; in ck_ht_map_create()
396 memset(map->probe_bound, 0, sizeof(CK_HT_WORD) * map->capacity); in ck_ht_gc()
405 size = sizeof(CK_HT_WORD) * map->capacity; in ck_ht_gc()
416 for (i = 0; i < map->capacity; i++) { in ck_ht_gc()
487 for (i = 0; i < map->capacity; i++) in ck_ht_gc()
619 if (i->offset >= map->capacity) in ck_ht_next()
626 } while (++i->offset < map->capacity); in ck_ht_next()
[all …]
Dck_rhs.c119 unsigned long capacity; member
260 map->max_entries = (map->capacity * (unsigned long)hs->load_factor) / 100; in ck_rhs_set_load_factor()
262 if (ck_rhs_grow(hs, map->capacity << 1) == false) in ck_rhs_set_load_factor()
284 if (i->offset >= map->capacity) in ck_rhs_next()
298 } while (++i->offset < map->capacity); in ck_rhs_next()
368 map->capacity = n_entries; in ck_rhs_map_create()
373 map->max_entries = (map->capacity * (unsigned long)hs->load_factor) / 100; in ck_rhs_map_create()
401 ck_rhs_reset_size(struct ck_rhs *hs, unsigned long capacity) in ck_rhs_reset_size() argument
406 map = ck_rhs_map_create(hs, capacity); in ck_rhs_reset_size()
421 return ck_rhs_reset_size(hs, previous->capacity); in ck_rhs_reset()
[all …]
/freebsd-12-stable/contrib/elftoolchain/libelftc/
Dlibelftc_vstr.c153 assert(v->capacity > 0); in vector_str_grow()
155 tmp_cap = BUFFER_GROW(v->capacity); in vector_str_grow()
157 assert(tmp_cap > v->capacity); in vector_str_grow()
168 v->capacity = tmp_cap; in vector_str_grow()
185 v->capacity = VECTOR_DEF_CAPACITY; in vector_str_init()
187 assert(v->capacity > 0); in vector_str_init()
189 if ((v->container = malloc(sizeof(char *) * v->capacity)) == NULL) in vector_str_init()
230 if (v->size == v->capacity && vector_str_grow(v) == false) in vector_str_push()
277 dst->capacity = tmp_cap; in vector_str_push_vector_head()
318 dst->capacity = tmp_cap; in vector_str_push_vector()
/freebsd-12-stable/contrib/unbound/sldns/
Dsbuffer.c19 sldns_buffer_new(size_t capacity) in sldns_buffer_new() argument
27 buffer->_data = (uint8_t *) malloc(capacity); in sldns_buffer_new()
34 buffer->_limit = buffer->_capacity = capacity; in sldns_buffer_new()
74 sldns_buffer_set_capacity(sldns_buffer *buffer, size_t capacity) in sldns_buffer_set_capacity() argument
79 assert(buffer->_position <= capacity && !buffer->_fixed); in sldns_buffer_set_capacity()
81 data = (uint8_t *) realloc(buffer->_data, capacity); in sldns_buffer_set_capacity()
87 buffer->_limit = buffer->_capacity = capacity; in sldns_buffer_set_capacity()
/freebsd-12-stable/contrib/ldns/
Dbuffer.c16 ldns_buffer_new(size_t capacity) in ldns_buffer_new() argument
24 buffer->_data = (uint8_t *) LDNS_XMALLOC(uint8_t, capacity); in ldns_buffer_new()
31 buffer->_limit = buffer->_capacity = capacity; in ldns_buffer_new()
60 ldns_buffer_set_capacity(ldns_buffer *buffer, size_t capacity) in ldns_buffer_set_capacity() argument
65 assert(buffer->_position <= capacity); in ldns_buffer_set_capacity()
67 data = (uint8_t *) LDNS_XREALLOC(buffer->_data, uint8_t, capacity); in ldns_buffer_set_capacity()
73 buffer->_limit = buffer->_capacity = capacity; in ldns_buffer_set_capacity()
/freebsd-12-stable/sys/gnu/dts/arm/
Dexynos5422-cpus.dtsi33 capacity-dmips-mhz = <539>;
45 capacity-dmips-mhz = <539>;
57 capacity-dmips-mhz = <539>;
69 capacity-dmips-mhz = <539>;
81 capacity-dmips-mhz = <1024>;
93 capacity-dmips-mhz = <1024>;
105 capacity-dmips-mhz = <1024>;
117 capacity-dmips-mhz = <1024>;
Dexynos5420-cpus.dtsi34 capacity-dmips-mhz = <1024>;
46 capacity-dmips-mhz = <1024>;
58 capacity-dmips-mhz = <1024>;
70 capacity-dmips-mhz = <1024>;
82 capacity-dmips-mhz = <539>;
94 capacity-dmips-mhz = <539>;
106 capacity-dmips-mhz = <539>;
118 capacity-dmips-mhz = <539>;
/freebsd-12-stable/usr.sbin/nscd/
Dhashtable.h54 size_t capacity; \
82 (table)->entries[var].field.capacity = \
129 ((entry)->field.capacity)
133 (entry)->field.capacity *= 2; \
135 (entry)->field.capacity * sizeof(type)); \
140 (entry)->field.capacity /= 2; \
142 (entry)->field.capacity * sizeof(type)); \
169 if (the_entry->field.size == the_entry->field.capacity) \
/freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/DebugInfo/PDB/Native/
DHashTable.h187 H.Capacity = capacity(); in commit()
213 uint32_t capacity() const { return Buckets.size(); } in capacity() function
223 uint32_t H = Traits.hashLookupKey(K) % capacity(); in find_as()
241 I = (I + 1) % capacity(); in find_as()
302 static uint32_t maxLoad(uint32_t capacity) { return capacity * 2 / 3 + 1; } in maxLoad() argument
307 uint32_t MaxLoad = maxLoad(capacity()); in grow()
308 if (S < maxLoad(capacity())) in grow()
310 assert(capacity() != UINT32_MAX && "Can't grow Hash table!"); in grow()
312 uint32_t NewCapacity = (capacity() <= INT32_MAX) ? MaxLoad * 2 : UINT32_MAX; in grow()
327 assert(capacity() == NewCapacity); in grow()
/freebsd-12-stable/sys/gnu/dts/arm64/amlogic/
Dmeson-g12b.dtsi51 capacity-dmips-mhz = <592>;
61 capacity-dmips-mhz = <592>;
71 capacity-dmips-mhz = <1024>;
81 capacity-dmips-mhz = <1024>;
91 capacity-dmips-mhz = <1024>;
101 capacity-dmips-mhz = <1024>;
/freebsd-12-stable/sys/contrib/zstd/lib/compress/
Dzstdmt_compress.c92 size_t capacity; member
145 totalBufferSize += bufPool->bTable[u].capacity; in ZSTDMT_sizeof_bufferPool()
174 size_t const availBufferSize = buf.capacity; in ZSTDMT_getBuffer()
179 bufPool->nbBuffers, (U32)buf.capacity); in ZSTDMT_getBuffer()
193 buffer.capacity = (start==NULL) ? 0 : bSize; in ZSTDMT_getBuffer()
212 if (buffer.capacity < bSize) { in ZSTDMT_resizeBuffer()
216 newBuffer.capacity = start == NULL ? 0 : bSize; in ZSTDMT_resizeBuffer()
218 assert(newBuffer.capacity >= buffer.capacity); in ZSTDMT_resizeBuffer()
219 memcpy(newBuffer.start, buffer.start, buffer.capacity); in ZSTDMT_resizeBuffer()
238 (U32)buf.capacity, (U32)(bufPool->nbBuffers-1)); in ZSTDMT_releaseBuffer()
[all …]
/freebsd-12-stable/sys/dev/qlnx/qlnxe/
Decore_chain.h127 u32 capacity; member
242 return (u16)(p_chain->capacity - used); in ecore_chain_get_elem_left()
261 return p_chain->capacity - used; in ecore_chain_get_elem_left_u32()
269 p_chain->capacity); in ecore_chain_is_full()
272 p_chain->capacity); in ecore_chain_is_full()
480 return p_chain->capacity; in ecore_chain_get_capacity()
585 for (i = 0; i < p_chain->capacity; i++) in ecore_chain_reset()
632 p_chain->capacity = p_chain->usable_per_page * page_cnt; in ecore_chain_init_params()
771 (prod_idx - 1 + p_chain->capacity) % p_chain->capacity; in ecore_chain_set_prod()
802 (cons_idx - 1 + p_chain->capacity) % p_chain->capacity; in ecore_chain_set_cons()
/freebsd-12-stable/contrib/llvm-project/compiler-rt/lib/scudo/standalone/
Dvector.h40 DCHECK_LE(Size, capacity()); in push_back()
41 if (Size == capacity()) { in push_back()
58 uptr capacity() const { return CapacityBytes / sizeof(T); } in capacity() function
61 if (NewSize > capacity()) in reserve()
/freebsd-12-stable/sys/gnu/dts/arm64/arm/
Djuno-r1.dts101 capacity-dmips-mhz = <1024>;
118 capacity-dmips-mhz = <1024>;
135 capacity-dmips-mhz = <578>;
152 capacity-dmips-mhz = <578>;
169 capacity-dmips-mhz = <578>;
186 capacity-dmips-mhz = <578>;
Djuno.dts100 capacity-dmips-mhz = <1024>;
118 capacity-dmips-mhz = <1024>;
136 capacity-dmips-mhz = <578>;
154 capacity-dmips-mhz = <578>;
172 capacity-dmips-mhz = <578>;
190 capacity-dmips-mhz = <578>;
Djuno-r2.dts101 capacity-dmips-mhz = <1024>;
119 capacity-dmips-mhz = <1024>;
137 capacity-dmips-mhz = <485>;
155 capacity-dmips-mhz = <485>;
173 capacity-dmips-mhz = <485>;
191 capacity-dmips-mhz = <485>;
/freebsd-12-stable/contrib/processor-trace/libipt/src/
Dpt_image_section_cache.c138 uint16_t capacity, target; in pt_iscache_expand() local
143 capacity = iscache->capacity; in pt_iscache_expand()
144 target = capacity + 8; in pt_iscache_expand()
147 if (target < capacity) in pt_iscache_expand()
154 iscache->capacity = target; in pt_iscache_expand()
703 if (iscache->capacity <= iscache->size) { in pt_iscache_add()
705 if (iscache->capacity < iscache->size) { in pt_iscache_add()
715 if (iscache->capacity <= iscache->size) { in pt_iscache_add()
831 iscache->capacity = 0; in pt_iscache_clear()
/freebsd-12-stable/contrib/ofed/opensm/complib/
Dcl_vector.c346 if (new_capacity <= p_vector->capacity) { in cl_vector_set_capacity()
361 p_vector->capacity * sizeof(void *)); in cl_vector_set_capacity()
374 new_elements = new_capacity - p_vector->capacity; in cl_vector_set_capacity()
388 for (i = p_vector->capacity; i < new_capacity; i++) { in cl_vector_set_capacity()
395 p_vector->capacity = new_capacity; in cl_vector_set_capacity()
416 if (size >= p_vector->capacity) { in cl_vector_set_size()
Dcl_ptr_vector.c176 if (new_capacity <= p_vector->capacity) { in cl_ptr_vector_set_capacity()
191 p_vector->capacity * sizeof(void *)); in cl_ptr_vector_set_capacity()
201 p_vector->capacity = new_capacity; in cl_ptr_vector_set_capacity()
220 if (size >= p_vector->capacity) { in cl_ptr_vector_set_size()
/freebsd-12-stable/contrib/gcc/
Dtree-phinodes.c207 int capacity, i; in make_phi_node() local
209 capacity = ideal_phi_node_len (len); in make_phi_node()
211 phi = allocate_phi_node (capacity); in make_phi_node()
220 PHI_ARG_CAPACITY (phi) = capacity; in make_phi_node()
227 for (i = 0; i < capacity; i++) in make_phi_node()
/freebsd-12-stable/sys/dev/xdma/controller/
Dpl330.c93 uint32_t capacity; member
187 chan->capacity = PL330_MAXLOAD; in pl330_intr()
423 uint32_t *capacity) in pl330_channel_capacity() argument
429 *capacity = chan->capacity; in pl330_channel_capacity()
567 chan->capacity = 0; in pl330_channel_submit_sg()
586 chan->capacity = PL330_MAXLOAD; in pl330_channel_prep_sg()

123456789