Home
last modified time | relevance | path

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

12345678910>>...22

/openbsd/sbin/unwind/libunbound/util/
H A Dalloc.c106 memset(alloc, 0, sizeof(*alloc)); in alloc_init()
114 alloc->last_id |= alloc->next_id; in alloc_init()
122 prealloc_blocks(alloc, alloc->max_reg_blocks); in alloc_init()
125 lock_protect(&alloc->lock, alloc, sizeof(*alloc)); in alloc_init()
164 if(!alloc) in alloc_clear()
169 if(alloc->super && alloc->quar) { in alloc_clear()
176 alloc->super->quar = alloc->quar; in alloc_clear()
177 alloc->super->num_quar += alloc->num_quar; in alloc_clear()
201 (*alloc->cleanup)(alloc->cleanup_arg); in alloc_get_id()
204 alloc->next_id = (uint64_t)alloc->thread_num; in alloc_get_id()
[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/usr.sbin/unbound/util/
H A Dalloc.c106 memset(alloc, 0, sizeof(*alloc)); in alloc_init()
114 alloc->last_id |= alloc->next_id; in alloc_init()
122 prealloc_blocks(alloc, alloc->max_reg_blocks); in alloc_init()
125 lock_protect(&alloc->lock, alloc, sizeof(*alloc)); in alloc_init()
164 if(!alloc) in alloc_clear()
169 if(alloc->super && alloc->quar) { in alloc_clear()
176 alloc->super->quar = alloc->quar; in alloc_clear()
177 alloc->super->num_quar += alloc->num_quar; in alloc_clear()
201 (*alloc->cleanup)(alloc->cleanup_arg); in alloc_get_id()
204 alloc->next_id = (uint64_t)alloc->thread_num; in alloc_get_id()
[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/gnu/gcc/gcc/
H A Dvec.c40 unsigned alloc; member
57 alloc = pfx->alloc; in calculate_allocation()
74 if (!alloc) in calculate_allocation()
75 alloc = 4; in calculate_allocation()
78 alloc = alloc * 2; in calculate_allocation()
81 alloc = (alloc * 3 / 2); in calculate_allocation()
87 return alloc; in calculate_allocation()
103 if (!alloc) in vec_gc_o_reserve_1()
107 ((struct vec_prefix *)vec)->alloc = alloc; in vec_gc_o_reserve_1()
175 if (!alloc) in vec_heap_o_reserve_1()
[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/usr.sbin/nsd/
H A Dudb.c202 if(!udb->alloc) { in udb_base_create_fd()
963 udb_alloc* alloc = (udb_alloc*)xalloc_zero(sizeof(*alloc)); local
964 if(!alloc)
983 free(alloc);
986 return alloc;
992 free(alloc);
1106 assert(alloc->disk->nextgrow <= alloc->udb->base_size);
1184 assert(alloc->udb->base_size >= alloc->disk->nextgrow);
1683 if(!udb_base_remap(alloc->udb, alloc, nsize))
1728 (*alloc->udb->walkfunc)(base, alloc->udb->walkarg, fp->type,
[all …]
/openbsd/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/usr.sbin/unbound/testcode/
H A Dunitmsgparse.c231 reply_info_parsedelete(rep, alloc); in perftestpkt()
386 testpkt(pkt, alloc, out, in simpletest()
390 testpkt(pkt, alloc, out, in simpletest()
402 testpkt(pkt, alloc, out, in simpletest()
432 perftestpkt(pkt, alloc, out, in simpletest()
459 testpkt(pkt, alloc, out, buf); in testfromfile()
484 testpkt(pkt, alloc, out, buf); in testfromdrillfile()
494 testpkt(pkt, alloc, out, buf); in testfromdrillfile()
512 alloc_init(&alloc, &super_a, 2); in msgparse_test()
515 simpletest(pkt, &alloc, out); in msgparse_test()
[all …]
H A Dunitverify.c95 lock_quick_lock(&alloc->lock); in entry_to_repinfo()
97 lock_quick_unlock(&alloc->lock); in entry_to_repinfo()
300 struct alloc_cache alloc; in verifytest_file() local
311 alloc_init(&alloc, NULL, 1); in verifytest_file()
331 alloc_clear(&alloc); in verifytest_file()
345 struct alloc_cache alloc; in dstest_file() local
354 alloc_init(&alloc, NULL, 1); in dstest_file()
367 alloc_clear(&alloc); in dstest_file()
480 struct alloc_cache alloc; in nsec3_hash_test() local
489 alloc_init(&alloc, NULL, 1); in nsec3_hash_test()
[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/usr.bin/ssh/
H A Dsshbuf.c62 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()
189 freezero(buf->d, buf->alloc); in sshbuf_free()
210 buf->alloc = SSHBUF_SIZE_INIT; in sshbuf_reset()
225 return buf->alloc; in sshbuf_alloc()
269 buf->alloc = rlen; in sshbuf_set_max_size()
272 if (max_size < buf->alloc) in sshbuf_set_max_size()
342 if (len + buf->size <= buf->alloc) in sshbuf_allocate()
353 rlen = buf->alloc + need; in sshbuf_allocate()
[all …]
/openbsd/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/gnu/llvm/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/
H A DRenderScriptRuntime.cpp1321 if (!alloc) in CaptureScriptInvokeForEachMulti()
1324 if (alloc) { in CaptureScriptInvokeForEachMulti()
1427 if (alloc) in CaptureAllocationInit()
1863 if (!alloc->address.isValid() || !alloc->context.isValid()) { in JITTypePointer()
1898 if (!alloc->type_ptr.isValid() || !alloc->context.isValid()) { in JITTypePacked()
2165 if (!alloc->address.isValid() || !alloc->data_ptr.isValid()) { in JITAllocationStride()
2404 if (!alloc) in LoadAllocation()
2625 if (!alloc) in SaveAllocation()
3147 return alloc; in FindAllocByID()
3164 return alloc; in FindAllocByID()
[all …]
/openbsd/gnu/llvm/llvm/lib/Demangle/
H A DMicrosoftDemangle.cpp331 QN->Components = Arena.alloc<NodeArrayNode>(); in synthesizeQualifiedName()
370 Arena.alloc<RttiBaseClassDescriptorNode>(); in demangleRttiBaseClassDescriptorNode()
1561 NodeList *Head = Arena.alloc<NodeList>(); in demangleNameScopeChain()
1864 TTN = Arena.alloc<ThunkSignatureNode>(); in demangleFunctionEncoding()
1867 TTN = Arena.alloc<ThunkSignatureNode>(); in demangleFunctionEncoding()
2076 NodeList *Head = Arena.alloc<NodeList>(); in demangleArrayType()
2088 Tail->Next = Arena.alloc<NodeList>(); in demangleArrayType()
2114 NodeList *Head = Arena.alloc<NodeList>(); in demangleFunctionParameterList()
2129 *Current = Arena.alloc<NodeList>(); in demangleFunctionParameterList()
2137 *Current = Arena.alloc<NodeList>(); in demangleFunctionParameterList()
[all …]
/openbsd/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
336 alloc.set_throw_prob(0); in join()
[all …]
/openbsd/usr.sbin/amd/amd/
H A Dmapc.c383 int alloc = 0; in mapc_create() local
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()
413 alloc = MAPC_INC; in mapc_create()
429 m->alloc = alloc; in mapc_create()
669 if (m->alloc >= MAPC_ALL) in mapc_sync()
671 m->alloc = MAPC_INC; in mapc_sync()
[all …]
/openbsd/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/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/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/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/usr.sbin/lpd/
H A Dproc.c51 size_t alloc; member
365 size_t alloc; in m_add() local
371 alloc = p->m_out.alloc ? p->m_out.alloc : 128; in m_add()
372 while (p->m_out.pos + len > alloc) in m_add()
373 alloc *= 2; in m_add()
374 if (alloc != p->m_out.alloc) { in m_add()
375 tmp = recallocarray(p->m_out.buf, p->m_out.alloc, alloc, 1); in m_add()
378 p->m_out.alloc = alloc; in m_add()
/openbsd/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()
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()
239 rrset_update_id(ref, alloc); in rrset_cache_update()
248 struct alloc_cache* alloc, time_t timenow) in rrset_cache_update_wildcard() argument
252 rrset = packed_rrset_copy_alloc(rrset, alloc, timenow); in rrset_cache_update_wildcard()
[all …]
/openbsd/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()
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()
239 rrset_update_id(ref, alloc); in rrset_cache_update()
248 struct alloc_cache* alloc, time_t timenow) in rrset_cache_update_wildcard() argument
252 rrset = packed_rrset_copy_alloc(rrset, alloc, timenow); in rrset_cache_update_wildcard()
[all …]
/openbsd/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>>...22