| /freebsd/contrib/unbound/util/ |
| H A D | alloc.c | 67 prealloc_setup(struct alloc_cache* alloc) in prealloc_setup() argument 78 alloc_set_special_next(p, alloc->quar); in prealloc_setup() 79 alloc->quar = p; in prealloc_setup() 80 alloc->num_quar++; in prealloc_setup() 86 prealloc_blocks(struct alloc_cache* alloc, size_t num) in prealloc_blocks() argument 96 r->next = (char*)alloc->reg_list; in prealloc_blocks() 97 alloc->reg_list = r; in prealloc_blocks() 98 alloc->num_reg_blocks ++; in prealloc_blocks() 103 alloc_init(struct alloc_cache* alloc, struct alloc_cache* super, in alloc_init() argument 106 memset(alloc, 0, sizeof(*alloc)); in alloc_init() [all …]
|
| H A D | alloc.h | 107 void alloc_init(struct alloc_cache* alloc, struct alloc_cache* super, 116 void alloc_clear(struct alloc_cache* alloc); 124 void alloc_clear_special(struct alloc_cache* alloc); 132 alloc_special_type* alloc_special_obtain(struct alloc_cache* alloc); 140 void alloc_special_release(struct alloc_cache* alloc, alloc_special_type* mem); 148 uint64_t alloc_get_id(struct alloc_cache* alloc); 155 size_t alloc_get_mem(struct alloc_cache* alloc); 161 void alloc_stats(struct alloc_cache* alloc); 168 struct regional* alloc_reg_obtain(struct alloc_cache* alloc); 175 void alloc_reg_release(struct alloc_cache* alloc, struct regional* r); [all …]
|
| /freebsd/sys/dev/cxgbe/iw_cxgbe/ |
| H A D | id_table.c | 49 u32 c4iw_id_alloc(struct c4iw_id_table *alloc) in c4iw_id_alloc() argument 54 spin_lock_irqsave(&alloc->lock, flags); in c4iw_id_alloc() 56 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in c4iw_id_alloc() 57 if (obj >= alloc->max) in c4iw_id_alloc() 58 obj = find_first_zero_bit(alloc->table, alloc->max); in c4iw_id_alloc() 60 if (obj < alloc->max) { in c4iw_id_alloc() 61 if (alloc->flags & C4IW_ID_TABLE_F_RANDOM) in c4iw_id_alloc() 62 alloc->last += arc4random() % RANDOM_SKIP; in c4iw_id_alloc() 64 alloc->last = obj + 1; in c4iw_id_alloc() 65 if (alloc->last >= alloc->max) in c4iw_id_alloc() [all …]
|
| /freebsd/sys/dev/mthca/ |
| H A D | mthca_allocator.c | 40 u32 mthca_alloc(struct mthca_alloc *alloc) in mthca_alloc() argument 45 spin_lock_irqsave(&alloc->lock, flags); in mthca_alloc() 47 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in mthca_alloc() 48 if (obj >= alloc->max) { in mthca_alloc() 49 alloc->top = (alloc->top + alloc->max) & alloc->mask; in mthca_alloc() 50 obj = find_first_zero_bit(alloc->table, alloc->max); in mthca_alloc() 53 if (obj < alloc->max) { in mthca_alloc() 54 set_bit(obj, alloc->table); in mthca_alloc() 55 obj |= alloc->top; in mthca_alloc() 59 spin_unlock_irqrestore(&alloc->lock, flags); in mthca_alloc() [all …]
|
| H A D | mthca_uar.c | 38 uar->index = mthca_alloc(&dev->uar_table.alloc); in mthca_uar_alloc() 49 mthca_free(&dev->uar_table.alloc, uar->index); in mthca_uar_free() 56 ret = mthca_alloc_init(&dev->uar_table.alloc, in mthca_init_uar_table() 65 mthca_alloc_cleanup(&dev->uar_table.alloc); in mthca_init_uar_table() 75 mthca_alloc_cleanup(&dev->uar_table.alloc); in mthca_cleanup_uar_table()
|
| H A D | mthca_pd.c | 46 pd->pd_num = mthca_alloc(&dev->pd_table.alloc); in mthca_pd_alloc() 56 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_alloc() 66 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_free() 71 return mthca_alloc_init(&dev->pd_table.alloc, in mthca_init_pd_table() 80 mthca_alloc_cleanup(&dev->pd_table.alloc); in mthca_cleanup_pd_table()
|
| /freebsd/usr.bin/mdo/ |
| H A D | mdo.c | 66 struct alloc { struct 71 static const struct alloc ALLOC_INITIALIZER = { argument 101 alloc_is_empty(const struct alloc *const alloc) in alloc_is_empty() argument 103 if (alloc->size == 0) { in alloc_is_empty() 104 assert(alloc->start == NULL); in alloc_is_empty() 107 assert(alloc->start != NULL); in alloc_is_empty() 113 alloc_realloc(struct alloc *const alloc) in alloc_realloc() argument 115 const size_t old_size = alloc->size; in alloc_realloc() 119 assert(alloc->start == NULL); in alloc_realloc() 130 alloc->start = realloc(alloc->start, new_size); in alloc_realloc() [all …]
|
| /freebsd/crypto/openssl/include/internal/ |
| H A D | ring_buf.h | 27 size_t alloc; /* size of buffer allocation in bytes */ member 50 r->alloc = 0; in OSSL_SAFE_MATH_UNSIGNED() 58 OPENSSL_clear_free(r->start, r->alloc); in ring_buf_destroy() 62 r->alloc = 0; in ring_buf_destroy() 72 return r->alloc - ring_buf_used(r); in ring_buf_avail() 94 idx = logical_offset % r->alloc; in ring_buf_write_at() 95 l = r->alloc - idx; in ring_buf_write_at() 131 idx = r->head_offset % r->alloc; in ring_buf_push() 132 l = r->alloc - idx; in ring_buf_push() 155 idx = logical_offset % r->alloc; in ring_buf_get_ptr() [all …]
|
| /freebsd/sys/contrib/zstd/lib/compress/ |
| H A D | zstd_cwksp.h | 254 void* const alloc = (BYTE*)ws->allocStart - bytes; in ZSTD_cwksp_reserve_internal_buffer_space() local 257 alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); in ZSTD_cwksp_reserve_internal_buffer_space() 259 assert(alloc >= bottom); in ZSTD_cwksp_reserve_internal_buffer_space() 260 if (alloc < bottom) { in ZSTD_cwksp_reserve_internal_buffer_space() 267 if (alloc < ws->tableValidEnd) { in ZSTD_cwksp_reserve_internal_buffer_space() 268 ws->tableValidEnd = alloc; in ZSTD_cwksp_reserve_internal_buffer_space() 270 ws->allocStart = alloc; in ZSTD_cwksp_reserve_internal_buffer_space() 271 return alloc; in ZSTD_cwksp_reserve_internal_buffer_space() 302 void* const alloc = ws->objectEnd; in ZSTD_cwksp_internal_advance_phase() local 303 … size_t const bytesToAlign = ZSTD_cwksp_bytes_to_align_ptr(alloc, ZSTD_CWKSP_ALIGNMENT_BYTES); in ZSTD_cwksp_internal_advance_phase() [all …]
|
| /freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
| H A D | zstd_cwksp.h | 227 void* alloc; in ZSTD_cwksp_reserve_internal() local 230 alloc = (BYTE *)ws->allocStart - bytes; in ZSTD_cwksp_reserve_internal() 234 alloc = (BYTE *)alloc - 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; in ZSTD_cwksp_reserve_internal() 238 alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); in ZSTD_cwksp_reserve_internal() 240 assert(alloc >= bottom); in ZSTD_cwksp_reserve_internal() 241 if (alloc < bottom) { in ZSTD_cwksp_reserve_internal() 246 if (alloc < ws->tableValidEnd) { in ZSTD_cwksp_reserve_internal() 247 ws->tableValidEnd = alloc; in ZSTD_cwksp_reserve_internal() 249 ws->allocStart = alloc; in ZSTD_cwksp_reserve_internal() 254 alloc = (BYTE *)alloc + ZSTD_CWKSP_ASAN_REDZONE_SIZE; in ZSTD_cwksp_reserve_internal() [all …]
|
| /freebsd/contrib/pam-krb5/tests/data/ |
| H A D | valgrind.supp | 56 fun:*alloc 63 fun:*alloc 70 fun:*alloc 84 fun:*alloc 91 fun:*alloc 98 fun:*alloc 105 fun:*alloc 113 fun:*alloc 115 fun:CRYPTO_*alloc 120 fun:*alloc [all …]
|
| /freebsd/crypto/openssh/ |
| H A D | sshbuf.c | 35 buf->size, buf->alloc, buf->off, buf->max_size); \ 48 size_t alloc; /* Total bytes allocated to buf->d */ member 64 buf->alloc > buf->max_size || in sshbuf_check_sanity() 65 buf->size > buf->alloc || in sshbuf_check_sanity() 99 ret->alloc = SSHBUF_SIZE_INIT; in sshbuf_new() 104 if ((ret->cd = ret->d = calloc(1, ret->alloc)) == NULL) { in sshbuf_new() 119 ret->alloc = ret->size = ret->max_size = len; in sshbuf_from() 191 freezero(buf->d, buf->alloc); in sshbuf_free() 208 if (buf->alloc != SSHBUF_SIZE_INIT) { in sshbuf_reset() 209 if ((d = recallocarray(buf->d, buf->alloc, SSHBUF_SIZE_INIT, in sshbuf_reset() [all …]
|
| /freebsd/contrib/unbound/testcode/ |
| H A D | unitverify.c | 90 entry_to_repinfo(struct entry* e, struct alloc_cache* alloc, in entry_to_repinfo() argument 101 lock_quick_lock(&alloc->lock); in entry_to_repinfo() 102 ret = reply_info_parse(pkt, alloc, qi, rep, region, &edns); in entry_to_repinfo() 103 lock_quick_unlock(&alloc->lock); in entry_to_repinfo() 114 extract_keys(struct entry* e, struct alloc_cache* alloc, in extract_keys() argument 122 entry_to_repinfo(e, alloc, region, pkt, &qinfo, &rep); in extract_keys() 132 reply_info_parsedelete(rep, alloc); in extract_keys() 214 verifytest_entry(struct entry* e, struct alloc_cache* alloc, in verifytest_entry() argument 230 entry_to_repinfo(e, alloc, region, pkt, &qinfo, &rep); in verifytest_entry() 236 reply_info_parsedelete(rep, alloc); in verifytest_entry() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Demangle/ |
| H A D | MicrosoftDemangle.cpp | 292 NamedIdentifierNode *NI = Arena.alloc<NamedIdentifierNode>(); in demangleSpecialTableSymbolNode() 310 SpecialTableSymbolNode *STSN = Arena.alloc<SpecialTableSymbolNode>(); in demangleSpecialTableSymbolNode() 334 Arena.alloc<LocalStaticGuardIdentifierNode>(); in demangleLocalStaticGuard() 338 Arena.alloc<LocalStaticGuardVariableNode>(); in demangleLocalStaticGuard() 357 NamedIdentifierNode *Id = Arena.alloc<NamedIdentifierNode>(); in synthesizeNamedIdentifier() 364 QualifiedNameNode *QN = Arena.alloc<QualifiedNameNode>(); in synthesizeQualifiedName() 365 QN->Components = Arena.alloc<NodeArrayNode>(); in synthesizeQualifiedName() 381 VariableSymbolNode *VSN = Arena.alloc<VariableSymbolNode>(); in synthesizeVariable() 393 VariableSymbolNode *VSN = Arena.alloc<VariableSymbolNode>(); in demangleUntypedVariable() 406 Arena.alloc<RttiBaseClassDescriptorNode>(); in demangleRttiBaseClassDescriptorNode() [all …]
|
| /freebsd/contrib/ntp/sntp/libevent/ |
| H A D | evthread.c | 106 if (target->alloc) in evthread_set_lock_callbacks() 112 if (target->alloc) { in evthread_set_lock_callbacks() 116 target->alloc == cbs->alloc && in evthread_set_lock_callbacks() 127 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) { in evthread_set_lock_callbacks() 200 if (original_lock_fns_.alloc) { in debug_lock_alloc() 201 if (!(result->lock = original_lock_fns_.alloc( in debug_lock_alloc() 374 if (!enable_locks && original_lock_fns_.alloc == NULL) { in evthread_setup_global_lock_() 378 } else if (!enable_locks && original_lock_fns_.alloc != NULL) { in evthread_setup_global_lock_() 401 return evthread_lock_fns_.alloc(locktype); in evthread_setup_global_lock_() 409 lock->lock = original_lock_fns_.alloc( in evthread_setup_global_lock_() [all …]
|
| /freebsd/contrib/libevent/ |
| H A D | evthread.c | 106 if (target->alloc) in evthread_set_lock_callbacks() 112 if (target->alloc) { in evthread_set_lock_callbacks() 116 target->alloc == cbs->alloc && in evthread_set_lock_callbacks() 127 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) { in evthread_set_lock_callbacks() 200 if (original_lock_fns_.alloc) { in debug_lock_alloc() 201 if (!(result->lock = original_lock_fns_.alloc( in debug_lock_alloc() 374 if (!enable_locks && original_lock_fns_.alloc == NULL) { in evthread_setup_global_lock_() 378 } else if (!enable_locks && original_lock_fns_.alloc != NULL) { in evthread_setup_global_lock_() 401 return evthread_lock_fns_.alloc(locktype); in evthread_setup_global_lock_() 409 lock->lock = original_lock_fns_.alloc( in evthread_setup_global_lock_() [all …]
|
| /freebsd/crypto/heimdal/kadmin/ |
| H A D | add-random-users.c | 45 unsigned n, alloc; in read_words() local 54 alloc = n = 0; in read_words() 59 if (n >= alloc) { in read_words() 60 alloc = max(alloc + 16, alloc * 2); in read_words() 61 w = erealloc (w, alloc * sizeof(char **)); in read_words()
|
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zhack/ |
| H A D | zhack_metaslab_leak.ksh | 56 alloc=$(zpool get -Hpo value alloc $TESTPOOL) 65 alloc2=$(zpool get -Hpo value alloc $TESTPOOL) 67 within_percent $alloc $alloc2 98 || 68 log_fail "space usage changed too much: $alloc to $alloc2"
|
| /freebsd/crypto/openssl/crypto/rsa/ |
| H A D | rsa_acvp_test_params.c | 19 OSSL_PARAM *d, *alloc = NULL; in ossl_rsa_acvp_test_gen_params_new() local 38 alloc = OPENSSL_zalloc(sizeof(settable)); in ossl_rsa_acvp_test_gen_params_new() 39 if (alloc == NULL) in ossl_rsa_acvp_test_gen_params_new() 42 d = alloc; in ossl_rsa_acvp_test_gen_params_new() 56 ossl_rsa_acvp_test_gen_params_free(alloc); in ossl_rsa_acvp_test_gen_params_new() 57 alloc = NULL; in ossl_rsa_acvp_test_gen_params_new() 61 *dst = alloc; in ossl_rsa_acvp_test_gen_params_new()
|
| /freebsd/crypto/heimdal/kuser/ |
| H A D | generate-requests.c | 39 unsigned n, alloc; in read_words() local 47 alloc = n = 0; in read_words() 50 if (n >= alloc) { in read_words() 51 alloc += 16; in read_words() 52 w = erealloc (w, alloc * sizeof(char **)); in read_words()
|
| /freebsd/contrib/unbound/services/cache/ |
| H A D | rrset.c | 62 struct alloc_cache* alloc) in rrset_cache_create() argument 70 ub_rrset_key_delete, rrset_data_delete, alloc); in rrset_cache_create() 86 struct config_file* cfg, struct alloc_cache* alloc) in rrset_cache_adjust() argument 92 r = rrset_cache_create(cfg, alloc); in rrset_cache_adjust() 177 rrset_update_id(struct rrset_ref* ref, struct alloc_cache* alloc) in rrset_update_id() argument 180 uint64_t newid = alloc_get_id(alloc); in rrset_update_id() 193 struct alloc_cache* alloc, time_t timenow) in rrset_cache_update() argument 219 ub_packed_rrset_parsedelete(k, alloc); in rrset_cache_update() 233 slabhash_insert(&r->table, h, &k->entry, k->entry.data, alloc); in rrset_cache_update() 241 rrset_update_id(ref, alloc); in rrset_cache_update() [all …]
|
| /freebsd/crypto/openssl/crypto/ |
| H A D | params_dup.c | 23 OSSL_PARAM_ALIGNED_BLOCK *alloc; /* The allocated buffer */ member 39 out->alloc = is_secure ? OPENSSL_secure_zalloc(sz) : OPENSSL_zalloc(sz); in ossl_param_buf_alloc() 40 if (out->alloc == NULL) in ossl_param_buf_alloc() 43 out->cur = out->alloc + extra_blocks; in ossl_param_buf_alloc() 126 OPENSSL_free(buf[OSSL_PARAM_BUF_PUBLIC].alloc); in OSSL_PARAM_dup() 130 dst = (OSSL_PARAM *)buf[OSSL_PARAM_BUF_PUBLIC].alloc; in OSSL_PARAM_dup() 133 ossl_param_set_secure_block(last, buf[OSSL_PARAM_BUF_SECURE].alloc, in OSSL_PARAM_dup()
|
| /freebsd/contrib/llvm-project/lldb/source/Symbol/ |
| H A D | PostfixExpression.cpp | 47 llvm::BumpPtrAllocator &alloc) { in ParseOneExpression() argument 59 stack.push_back(MakeNode<BinaryOpNode>(alloc, *op_type, *left, *right)); in ParseOneExpression() 69 stack.push_back(MakeNode<UnaryOpNode>(alloc, *op_type, *operand)); in ParseOneExpression() 76 stack.push_back(MakeNode<IntegerNode>(alloc, value)); in ParseOneExpression() 80 stack.push_back(MakeNode<SymbolNode>(alloc, token)); in ParseOneExpression() 90 postfix::ParseFPOProgram(llvm::StringRef prog, llvm::BumpPtrAllocator &alloc) { in ParseFPOProgram() argument 101 Node *rhs = ParseOneExpression(expr, alloc); in ParseFPOProgram()
|
| /freebsd/usr.sbin/bhyve/ |
| H A D | qemu_loader.c | 32 } alloc; member 91 strncpy(element->entry.alloc.name, name, QEMU_FWCFG_MAX_NAME); in qemu_loader_alloc() 92 element->entry.alloc.alignment_le = htole32(alignment); in qemu_loader_alloc() 93 element->entry.alloc.zone = zone; in qemu_loader_alloc() 205 printf(" name : %s\n\r", entry->alloc.name); in qemu_loader_dump_entry() 207 le32toh(entry->alloc.alignment_le)); in qemu_loader_dump_entry() 209 qemu_loader_get_zone_name(entry->alloc.zone)); in qemu_loader_dump_entry()
|
| /freebsd/crypto/heimdal/kpasswd/ |
| H A D | kpasswd-generator.c | 41 unsigned n, alloc; in read_words() local 49 alloc = n = 0; in read_words() 52 if (n >= alloc) { in read_words() 53 alloc += 16; in read_words() 54 w = erealloc (w, alloc * sizeof(char **)); in read_words()
|