Home
last modified time | relevance | path

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

12345678910>>...21

/openbsd-src/sbin/unwind/libunbound/util/
H A Dalloc.c2 * util/alloc.c - memory allocation service.
43 #include "util/alloc.h"
64 * @param alloc: the structure to fill up.
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 in prealloc_blocks()
103 alloc_init(struct alloc_cache * alloc,struct alloc_cache * super,int thread_num) alloc_init() argument
131 alloc_clear_special_list(struct alloc_cache * alloc) alloc_clear_special_list() argument
146 alloc_clear_special(struct alloc_cache * alloc) alloc_clear_special() argument
160 alloc_clear(struct alloc_cache * alloc) alloc_clear() argument
195 alloc_get_id(struct alloc_cache * alloc) alloc_get_id() argument
214 alloc_special_obtain(struct alloc_cache * alloc) alloc_special_obtain() argument
254 pushintosuper(struct alloc_cache * alloc,alloc_special_type * mem) pushintosuper() argument
279 alloc_special_release(struct alloc_cache * alloc,alloc_special_type * mem) alloc_special_release() argument
304 alloc_stats(struct alloc_cache * alloc) alloc_stats() argument
310 alloc_get_mem(struct alloc_cache * alloc) alloc_get_mem() argument
329 alloc_reg_obtain(struct alloc_cache * alloc) alloc_reg_obtain() argument
342 alloc_reg_release(struct alloc_cache * alloc,struct regional * r) alloc_reg_release() argument
357 alloc_set_id_cleanup(struct alloc_cache * alloc,void (* cleanup)(void *),void * arg) alloc_set_id_cleanup() argument
[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 …]
/openbsd-src/usr.sbin/unbound/util/
H A Dalloc.c2 * util/alloc.c - memory allocation service.
43 #include "util/alloc.h"
64 * @param alloc: the structure to fill up.
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 in prealloc_blocks()
103 alloc_init(struct alloc_cache * alloc,struct alloc_cache * super,int thread_num) alloc_init() argument
131 alloc_clear_special_list(struct alloc_cache * alloc) alloc_clear_special_list() argument
146 alloc_clear_special(struct alloc_cache * alloc) alloc_clear_special() argument
160 alloc_clear(struct alloc_cache * alloc) alloc_clear() argument
195 alloc_get_id(struct alloc_cache * alloc) alloc_get_id() argument
214 alloc_special_obtain(struct alloc_cache * alloc) alloc_special_obtain() argument
254 pushintosuper(struct alloc_cache * alloc,alloc_special_type * mem) pushintosuper() argument
279 alloc_special_release(struct alloc_cache * alloc,alloc_special_type * mem) alloc_special_release() argument
304 alloc_stats(struct alloc_cache * alloc) alloc_stats() argument
310 alloc_get_mem(struct alloc_cache * alloc) alloc_get_mem() argument
329 alloc_reg_obtain(struct alloc_cache * alloc) alloc_reg_obtain() argument
342 alloc_reg_release(struct alloc_cache * alloc,struct regional * r) alloc_reg_release() argument
357 alloc_set_id_cleanup(struct alloc_cache * alloc,void (* cleanup)(void *),void * arg) alloc_set_id_cleanup() argument
[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 …]
/openbsd-src/gnu/gcc/gcc/
H A Dvec.c40 unsigned alloc; member
50 unsigned alloc = 0; in calculate_allocation() local
57 alloc = pfx->alloc; in calculate_allocation()
66 gcc_assert (alloc - num < (unsigned) reserve); in calculate_allocation()
70 alloc = num + reserve; in calculate_allocation()
74 if (!alloc) in calculate_allocation()
75 alloc = 4; in calculate_allocation()
76 else if (alloc < 16) in calculate_allocation()
78 alloc = alloc * 2; in calculate_allocation()
81 alloc = (alloc * 3 / 2); in calculate_allocation()
[all …]
H A Dgcov-io.c160 gcov_var.alloc = 0; in gcov_close()
192 size_t new_size = gcov_var.alloc; in gcov_allocate()
199 gcov_var.alloc = new_size; in gcov_allocate()
236 if (gcov_var.offset + words > gcov_var.alloc) in gcov_write_words()
281 unsigned alloc = 0; in gcov_write_string() local
287 alloc = (length + 4) >> 2; in gcov_write_string()
290 buffer = gcov_write_words (1 + alloc); in gcov_write_string()
292 buffer[0] = alloc; in gcov_write_string()
293 buffer[alloc] = 0; in gcov_write_string()
402 if (gcov_var.length + words > gcov_var.alloc) in gcov_read_words()
[all …]
/openbsd-src/usr.sbin/nsd/
H A Dudb.c34 static int udb_alloc_compact(void* base, udb_alloc* alloc);
200 udb->alloc = udb_alloc_create(udb, (udb_alloc_d*)( in udb_base_create_fd()
202 if(!udb->alloc) { in udb_base_create_fd()
209 udb_alloc_compact(udb, udb->alloc); in udb_base_create_fd()
320 if(udb->fd != -1 && udb->base && udb->alloc) { in udb_base_close()
321 uint64_t nsize = udb->alloc->disk->nextgrow; in udb_base_close()
345 udb_alloc_delete(udb->alloc); in udb_base_free()
359 udb_alloc_delete(udb->alloc); in udb_base_free_keep_mmap()
517 udb_base_remap(udb_base* udb, udb_alloc* alloc, uint64_t nsize) in udb_base_remap() argument
561 alloc->disk = (udb_alloc_d*)((char*)udb->glob_data in udb_base_remap()
[all …]
/openbsd-src/gnu/usr.bin/binutils-2.17/binutils/
H A Dbudemang.c41 char *res, *alloc; in demangle() local
57 alloc = NULL; in demangle()
61 alloc = xmalloc (suf - name + 1); in demangle()
62 memcpy (alloc, name, suf - name); in demangle()
63 alloc[suf - name] = '\0'; in demangle()
64 name = alloc; in demangle()
77 if (alloc != NULL) in demangle()
78 free (alloc); in demangle()
96 if (alloc != NULL) in demangle()
97 free (alloc); in demangle()
/openbsd-src/usr.bin/ssh/
H A Dsshbuf.c31 printf("%s:%d %s: %s size %zu alloc %zu off %zu max %zu\n", \
33 buf->size, buf->alloc, buf->off, buf->max_size); \
46 size_t alloc; /* Total bytes allocated to buf->d */ member
62 buf->alloc > buf->max_size || in sshbuf_check_sanity()
63 buf->size > buf->alloc || in sshbuf_check_sanity()
97 ret->alloc = SSHBUF_SIZE_INIT; in sshbuf_new()
102 if ((ret->cd = ret->d = calloc(1, ret->alloc)) == NULL) { in sshbuf_new()
117 ret->alloc = ret->size = ret->max_size = len; in sshbuf_from()
189 freezero(buf->d, buf->alloc); in sshbuf_free()
206 if (buf->alloc ! in sshbuf_reset()
[all...]
/openbsd-src/usr.sbin/unbound/testcode/
H A Dunitmsgparse.c200 perftestpkt(sldns_buffer* pkt, struct alloc_cache* alloc, sldns_buffer* out, in perftestpkt() argument
218 ret = reply_info_parse(pkt, alloc, &qi, &rep, region, &edns); in perftestpkt()
231 reply_info_parsedelete(rep, alloc); in perftestpkt()
314 testpkt(sldns_buffer* pkt, struct alloc_cache* alloc, sldns_buffer* out, in testpkt() argument
332 ret = reply_info_parse(pkt, alloc, &qi, &rep, region, &edns); in testpkt()
377 reply_info_parsedelete(rep, alloc); in testpkt()
383 simpletest(sldns_buffer* pkt, struct alloc_cache* alloc, sldns_buffer* out) in simpletest() argument
386 testpkt(pkt, alloc, out, in simpletest()
390 testpkt(pkt, alloc, out, in simpletest()
402 testpkt(pkt, alloc, out, in simpletest()
[all …]
H A Dunitverify.c54 #include "util/alloc.h"
84 entry_to_repinfo(struct entry* e, struct alloc_cache* alloc, in entry_to_repinfo() argument
91 /* lock alloc lock to please lock checking software. in entry_to_repinfo()
92 * alloc_special_obtain assumes it is talking to a ub-alloc, in entry_to_repinfo()
93 * and does not need to perform locking. Here the alloc is in entry_to_repinfo()
95 lock_quick_lock(&alloc->lock); in entry_to_repinfo()
96 ret = reply_info_parse(pkt, alloc, qi, rep, region, &edns); in entry_to_repinfo()
97 lock_quick_unlock(&alloc->lock); in entry_to_repinfo()
108 extract_keys(struct entry* e, struct alloc_cache* alloc, in extract_keys() argument
116 entry_to_repinfo(e, alloc, regio in extract_keys()
206 verifytest_entry(struct entry * e,struct alloc_cache * alloc,struct regional * region,sldns_buffer * pkt,struct ub_packed_rrset_key * dnskey,struct module_env * env,struct val_env * ve) verifytest_entry() argument
246 dstest_entry(struct entry * e,struct alloc_cache * alloc,struct regional * region,sldns_buffer * pkt,struct module_env * env) dstest_entry() argument
298 struct alloc_cache alloc; verifytest_file() local
343 struct alloc_cache alloc; dstest_file() local
421 nsec3_hash_test_entry(struct entry * e,rbtree_type * ct,struct alloc_cache * alloc,struct regional * region,sldns_buffer * buf) nsec3_hash_test_entry() argument
478 struct alloc_cache alloc; nsec3_hash_test() local
[all...]
H A Dmemstats.c60 uint64_t alloc; member
119 cl->alloc = 0; in get_codeline()
147 cl->alloc += num; in read_malloc_stat()
173 cl->alloc += num*sz; in read_calloc_stat()
231 printf("%12lld / %8lld in %s %s\n", (long long)cl->alloc, in printstats()
233 total += cl->alloc; in printstats()
/openbsd-src/gnu/llvm/compiler-rt/lib/tsan/tests/unit/
H A Dtsan_dense_alloc_test.cpp30 Alloc alloc("test"); in TEST() local
32 alloc.InitCache(&cache); in TEST()
37 IndexT idx = alloc.Alloc(&cache); in TEST()
40 T *v = alloc.Map(idx); in TEST()
46 T *v = alloc.Map(idx); in TEST()
48 alloc.Free(&cache, idx); in TEST()
51 alloc.FlushCache(&cache); in TEST()
/openbsd-src/gnu/llvm/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/
H A DRenderScriptRuntime.cpp1320 AllocationDetails *alloc = LookUpAllocation(alloc_addr); in CaptureScriptInvokeForEachMulti() local
1321 if (!alloc) in CaptureScriptInvokeForEachMulti()
1322 alloc = CreateAllocation(alloc_addr); in CaptureScriptInvokeForEachMulti()
1324 if (alloc) { in CaptureScriptInvokeForEachMulti()
1326 if (alloc->address.isValid()) { in CaptureScriptInvokeForEachMulti()
1328 assert(*alloc->address.get() == alloc_addr); in CaptureScriptInvokeForEachMulti()
1330 alloc->address = alloc_addr; in CaptureScriptInvokeForEachMulti()
1335 if (alloc->context.isValid() && in CaptureScriptInvokeForEachMulti()
1336 *alloc->context.get() != addr_t(args[eRsContext])) in CaptureScriptInvokeForEachMulti()
1340 alloc->context = addr_t(args[eRsContext]); in CaptureScriptInvokeForEachMulti()
[all …]
/openbsd-src/gnu/llvm/llvm/lib/Demangle/
H A DMicrosoftDemangle.cpp260 NamedIdentifierNode *NI = Arena.alloc<NamedIdentifierNode>(); in demangleSpecialTableSymbolNode()
278 SpecialTableSymbolNode *STSN = Arena.alloc<SpecialTableSymbolNode>(); in demangleSpecialTableSymbolNode()
300 Arena.alloc<LocalStaticGuardIdentifierNode>(); in demangleLocalStaticGuard()
304 Arena.alloc<LocalStaticGuardVariableNode>(); in demangleLocalStaticGuard()
323 NamedIdentifierNode *Id = Arena.alloc<NamedIdentifierNode>(); in synthesizeNamedIdentifier()
330 QualifiedNameNode *QN = Arena.alloc<QualifiedNameNode>(); in synthesizeQualifiedName()
331 QN->Components = Arena.alloc<NodeArrayNode>(); in synthesizeQualifiedName()
347 VariableSymbolNode *VSN = Arena.alloc<VariableSymbolNode>(); in synthesizeVariable()
357 VariableSymbolNode *VSN = Arena.alloc<VariableSymbolNode>(); in demangleUntypedVariable()
370 Arena.alloc<RttiBaseClassDescriptorNode>(); in demangleRttiBaseClassDescriptorNode()
[all …]
/openbsd-src/gnu/gcc/libstdc++-v3/include/ext/pb_ds/detail/
H A Dmap_debug_base.hpp154 __gnu_cxx::throw_allocator<char> alloc; in insert_new()
155 const double orig_throw_prob = alloc.get_throw_prob(); in insert_new()
156 alloc.set_throw_prob(0); in insert_new()
172 alloc.set_throw_prob(orig_throw_prob); in insert_new()
313 __gnu_cxx::throw_allocator<char> alloc; in split() local
314 const double orig_throw_prob = alloc.get_throw_prob(); in split()
315 alloc.set_throw_prob(0); in split()
326 alloc.set_throw_prob(orig_throw_prob); in split()
334 __gnu_cxx::throw_allocator<char> alloc; in join() local
335 const double orig_throw_prob = alloc.get_throw_prob(); in join()
[all …]
/openbsd-src/usr.sbin/amd/amd/
H A Dmapc.c66 #define MAPC_ISRE(m) ((m)->alloc == MAPC_RE)
127 short alloc; /* Allocation mode */ member
383 int alloc = 0; in mapc_create() local
385 (void) cmdoption(opt, mapc_opt, &alloc); in mapc_create()
392 m->flags = alloc & ~MAPC_CACHE_MASK; in mapc_create()
393 alloc &= MAPC_CACHE_MASK; in mapc_create()
395 if (alloc == MAPC_DFLT) in mapc_create()
396 alloc = mt->def_alloc; in mapc_create()
397 switch (alloc) { in mapc_create()
400 alloc = MAPC_INC; in mapc_create()
[all …]
/openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.ns/
H A Dtemplate9.C9 inline T* alloc(const int aWidth) in alloc() function
21 T** alloc(const int aWidth,const int aHeight) in alloc() function
24 T **mat = vector::alloc<T*>(aHeight); in alloc()
25 T *data = vector::alloc<T> (aWidth*aHeight); in alloc()
38 double **m=matrix::alloc<double>(10,20); in main()
/openbsd-src/gnu/lib/libiberty/src/testsuite/
H A Dtest-demangle.c49 size_t alloc = buf->alloced; local
56 alloc = LINELEN;
70 if (count + 1 >= alloc)
72 alloc *= 2;
73 data = xrealloc (data, alloc);
82 buf->alloced = alloc;
/openbsd-src/gnu/llvm/lldb/tools/debugserver/source/
H A DRNBServices.cpp43 CFAllocatorRef alloc = kCFAllocatorDefault; in GetProcesses() local
69 ::CFDictionaryCreateMutable(alloc, 0, &kCFTypeDictionaryKeyCallBacks, in GetProcesses()
75 ::CFNumberCreate(alloc, kCFNumberSInt32Type, &pid_int32)); in GetProcesses()
126 CFAllocatorRef alloc = kCFAllocatorDefault; in ListApplications() local
131 ::CFArrayCreateMutable(alloc, 0, &kCFTypeArrayCallBacks)); in ListApplications()
155 ::CFDictionaryCreateMutable(alloc, 0, &kCFTypeDictionaryKeyCallBacks, in ListApplications()
163 ::CFNumberCreate(alloc, kCFNumberSInt32Type, &pid)); in ListApplications()
212 ::CFPropertyListCreateXMLData(alloc, plistMutableArray.get())); in ListApplications()
/openbsd-src/gnu/llvm/compiler-rt/lib/gwp_asan/tests/
H A Diterate.cpp18 auto alloc = [&](size_t size) { in TEST_F() local
23 alloc(2); in TEST_F()
24 alloc(1); in TEST_F()
25 alloc(100); in TEST_F()
27 alloc(42); in TEST_F()
/openbsd-src/usr.sbin/lpd/
H A Dproc.c51 size_t alloc; member
358 size_t alloc; in m_close()
364 alloc = p->m_out.alloc ? p->m_out.alloc : 128; in m_add()
365 while (p->m_out.pos + len > alloc) in m_add() local
366 alloc *= 2; in m_add()
367 if (alloc != p->m_out.alloc) { in m_add()
368 tmp = recallocarray(p->m_out.buf, p->m_out.alloc, allo in m_add()
[all...]
/openbsd-src/usr.sbin/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 …]
/openbsd-src/sbin/unwind/libunbound/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 …]
/openbsd-src/gnu/llvm/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()

12345678910>>...21