Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 298) sorted by relevance

12345678910>>...12

/freebsd/contrib/unbound/util/
H A Dalloc.c67 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 Dalloc.h107 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 Did_table.c49 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 Dmthca_allocator.c40 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 Dmthca_uar.c38 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 Dmthca_pd.c46 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()
H A Dmthca_dev.h197 struct mthca_alloc alloc; member
203 struct mthca_alloc alloc; member
229 struct mthca_alloc alloc; member
242 struct mthca_alloc alloc; member
249 struct mthca_alloc alloc; member
256 struct mthca_alloc alloc; member
272 struct mthca_alloc alloc; member
277 struct mthca_alloc alloc; member
416 u32 mthca_alloc(struct mthca_alloc *alloc);
417 void mthca_free(struct mthca_alloc *alloc, u32 obj);
[all …]
/freebsd/sys/contrib/zstd/lib/compress/
H A Dzstd_cwksp.h254 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 Dzstd_cwksp.h226 void* alloc; in ZSTD_cwksp_reserve_internal() local
229 alloc = (BYTE *)ws->allocStart - bytes; in ZSTD_cwksp_reserve_internal()
233 alloc = (BYTE *)alloc - 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE; in ZSTD_cwksp_reserve_internal()
237 alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); in ZSTD_cwksp_reserve_internal()
239 assert(alloc >= bottom); in ZSTD_cwksp_reserve_internal()
240 if (alloc < bottom) { in ZSTD_cwksp_reserve_internal()
245 if (alloc < ws->tableValidEnd) { in ZSTD_cwksp_reserve_internal()
246 ws->tableValidEnd = alloc; in ZSTD_cwksp_reserve_internal()
248 ws->allocStart = alloc; in ZSTD_cwksp_reserve_internal()
253 alloc = (BYTE *)alloc + ZSTD_CWKSP_ASAN_REDZONE_SIZE; in ZSTD_cwksp_reserve_internal()
[all …]
/freebsd/crypto/openssh/
H A Dsshbuf.c35 buf->size, buf->alloc, buf->off, buf->max_size); \
48 size_t alloc; /* Total bytes allocated to buf->d */ member
63 buf->alloc > buf->max_size || in sshbuf_check_sanity()
64 buf->size > buf->alloc || in sshbuf_check_sanity()
98 ret->alloc = SSHBUF_SIZE_INIT; in sshbuf_new()
103 if ((ret->cd = ret->d = calloc(1, ret->alloc)) == NULL) { in sshbuf_new()
118 ret->alloc = ret->size = ret->max_size = len; in sshbuf_from()
189 explicit_bzero(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/llvm-project/llvm/lib/Demangle/
H A DMicrosoftDemangle.cpp291 NamedIdentifierNode *NI = Arena.alloc<NamedIdentifierNode>(); in demangleSpecialTableSymbolNode()
309 SpecialTableSymbolNode *STSN = Arena.alloc<SpecialTableSymbolNode>(); in demangleSpecialTableSymbolNode()
333 Arena.alloc<LocalStaticGuardIdentifierNode>(); in demangleLocalStaticGuard()
337 Arena.alloc<LocalStaticGuardVariableNode>(); in demangleLocalStaticGuard()
356 NamedIdentifierNode *Id = Arena.alloc<NamedIdentifierNode>(); in synthesizeNamedIdentifier()
363 QualifiedNameNode *QN = Arena.alloc<QualifiedNameNode>(); in synthesizeQualifiedName()
364 QN->Components = Arena.alloc<NodeArrayNode>(); in synthesizeQualifiedName()
380 VariableSymbolNode *VSN = Arena.alloc<VariableSymbolNode>(); in synthesizeVariable()
392 VariableSymbolNode *VSN = Arena.alloc<VariableSymbolNode>(); in demangleUntypedVariable()
405 Arena.alloc<RttiBaseClassDescriptorNode>(); in demangleRttiBaseClassDescriptorNode()
[all …]
/freebsd/contrib/ntp/sntp/libevent/
H A Devthread.c106 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 Devthread.c106 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 Dadd-random-users.c45 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/crypto/openssl/crypto/rsa/
H A Drsa_acvp_test_params.c19 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 Dgenerate-requests.c39 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 Drrset.c62 struct alloc_cache* alloc) in rrset_cache_create() argument
70 ub_rrset_key_delete, rrset_data_delete, alloc); in rrset_cache_create()
84 struct config_file* cfg, struct alloc_cache* alloc) in rrset_cache_adjust() argument
90 r = rrset_cache_create(cfg, alloc); in rrset_cache_adjust()
175 rrset_update_id(struct rrset_ref* ref, struct alloc_cache* alloc) in rrset_update_id() argument
178 uint64_t newid = alloc_get_id(alloc); in rrset_update_id()
191 struct alloc_cache* alloc, time_t timenow) in rrset_cache_update() argument
217 ub_packed_rrset_parsedelete(k, alloc); in rrset_cache_update()
231 slabhash_insert(&r->table, h, &k->entry, k->entry.data, alloc); in rrset_cache_update()
239 rrset_update_id(ref, alloc); in rrset_cache_update()
[all …]
H A Drrset.h68 struct alloc_cache* alloc);
86 struct config_file* cfg, struct alloc_cache* alloc);
134 struct alloc_cache* alloc, time_t timenow);
152 struct alloc_cache* alloc, time_t timenow);
/freebsd/crypto/openssl/crypto/
H A Dparams_dup.c23 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()
46 out->cur = out->alloc + extra_blocks; in ossl_param_buf_alloc()
127 OPENSSL_free(buf[OSSL_PARAM_BUF_PUBLIC].alloc); in OSSL_PARAM_dup()
131 dst = (OSSL_PARAM *)buf[OSSL_PARAM_BUF_PUBLIC].alloc; in OSSL_PARAM_dup()
134 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 DPostfixExpression.cpp47 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 Dqemu_loader.c32 } 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 Dkpasswd-generator.c41 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()
/freebsd/contrib/ncurses/misc/
H A Dncurses.supp46 fun:*alloc
90 fun:*alloc
98 fun:*alloc
107 fun:*alloc
115 fun:*alloc
170 fun:*alloc
178 fun:*alloc
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DExprObjC.cpp186 Mem = alloc(Context, Args.size(), 0); in Create()
188 Mem = alloc(Context, Args, RBracLoc, SelLocs, Sel, SelLocsK); in Create()
205 Mem = alloc(Context, Args.size(), 0); in Create()
207 Mem = alloc(Context, Args, RBracLoc, SelLocs, Sel, SelLocsK); in Create()
224 Mem = alloc(Context, Args.size(), 0); in Create()
226 Mem = alloc(Context, Args, RBracLoc, SelLocs, Sel, SelLocsK); in Create()
235 ObjCMessageExpr *Mem = alloc(Context, NumArgs, NumStoredSelLocs); in CreateEmpty()
239 ObjCMessageExpr *ObjCMessageExpr::alloc(const ASTContext &C, in alloc() function in ObjCMessageExpr
248 return alloc(C, Args.size(), NumStoredSelLocs); in alloc()
251 ObjCMessageExpr *ObjCMessageExpr::alloc(const ASTContext &C, unsigned NumArgs, in alloc() function in ObjCMessageExpr
/freebsd/sys/dev/dpaa2/
H A Ddpaa2_buf.c60 const int alloc = DPAA2_ATOMIC_READ(&sc->buf_num); in dpaa2_buf_seed_pool() local
74 count = (alloc + count > DPAA2_NI_BUFS_MAX) in dpaa2_buf_seed_pool()
75 ? DPAA2_NI_BUFS_MAX - alloc : count; in dpaa2_buf_seed_pool()
79 for (int i = alloc; i < alloc + count; i++) { in dpaa2_buf_seed_pool()

12345678910>>...12