/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress_minheap.c | 44 check_heap(struct min_heap *heap) in check_heap() argument 47 for (i = 1; i < heap->n; ++i) { in check_heap() 49 tt_want(evutil_timercmp(&heap->p[i]->ev_timeout, in check_heap() 50 &heap->p[parent_idx]->ev_timeout, >=)); in check_heap() 57 struct min_heap heap; in test_heap_randomized() local 62 min_heap_ctor_(&heap); in test_heap_randomized() 67 min_heap_push_(&heap, inserted[i]); in test_heap_randomized() 69 check_heap(&heap); in test_heap_randomized() 71 tt_assert(min_heap_size_(&heap) == 1024); in test_heap_randomized() 74 min_heap_erase_(&heap, inserted[i]); in test_heap_randomized() [all …]
|
/freebsd/contrib/libevent/test/ |
H A D | regress_minheap.c | 44 check_heap(struct min_heap *heap) in check_heap() argument 47 for (i = 1; i < heap->n; ++i) { in check_heap() 49 tt_want(evutil_timercmp(&heap->p[i]->ev_timeout, in check_heap() 50 &heap->p[parent_idx]->ev_timeout, >=)); in check_heap() 57 struct min_heap heap; in test_heap_randomized() local 62 min_heap_ctor_(&heap); in test_heap_randomized() 67 min_heap_push_(&heap, inserted[i]); in test_heap_randomized() 69 check_heap(&heap); in test_heap_randomized() 71 tt_assert(min_heap_size_(&heap) == 1024); in test_heap_randomized() 74 min_heap_erase_(&heap, inserted[i]); in test_heap_randomized() [all …]
|
/freebsd/contrib/bzip2/ |
H A D | huffman.c | 36 zz = z; tmp = heap[zz]; \ 37 while (weight[tmp] < weight[heap[zz >> 1]]) { \ 38 heap[zz] = heap[zz >> 1]; \ 41 heap[zz] = tmp; \ 47 zz = z; tmp = heap[zz]; \ 52 weight[heap[yy+1]] < weight[heap[yy]]) \ 54 if (weight[tmp] < weight[heap[yy]]) break; \ 55 heap[zz] = heap[yy]; \ 58 heap[zz] = tmp; \ 75 Int32 heap [ BZ_MAX_ALPHA_SIZE + 2 ]; in BZ2_hbMakeCodeLengths() local [all …]
|
/freebsd/crypto/openssl/ssl/ |
H A D | priority_queue.c | 50 struct pq_heap_st *heap; member 69 assert(pq->elements[pq->heap[idx].index].used); \ 70 assert(pq->elements[pq->heap[idx].index].posn == idx) 107 struct pq_heap_st *h = pq->heap, t_h; in pqueue_swap_elem() 123 struct pq_heap_st *h = pq->heap; in pqueue_move_elem() 154 struct pq_heap_st *h = pq->heap; in pqueue_move_down() 174 struct pq_heap_st *h = pq->heap; in pqueue_move_up() 208 pq->heap[n].data = data; in ossl_pqueue_push() 209 pq->heap[n].index = m; in ossl_pqueue_push() 225 return pq->heap->data; in ossl_pqueue_peek() [all …]
|
/freebsd/crypto/openssl/doc/man3/ |
H A D | OPENSSL_secure_malloc.pod | 11 CRYPTO_secure_used - secure heap storage 45 information might be stored, OpenSSL supports the concept of a "secure heap." 50 If a secure heap is used, then private key B<BIGNUM> values are stored there. 54 CRYPTO_secure_malloc_init() creates the secure heap, with the specified 56 allocate from the heap or zero to use a reasonable default value. 62 heap as been initialized and is available. 64 CRYPTO_secure_malloc_done() releases the heap and makes the memory unavailable 68 OPENSSL_secure_malloc() allocates C<num> bytes from the heap. 78 OPENSSL_secure_free() releases the memory at C<ptr> back to the heap. 90 the memory if it was not allocated from the secure heap. [all …]
|
H A D | PEM_bytes_read_bio.pod | 43 memory from the secure heap for its temporary buffers and the storage 49 PEM_bytes_read_bio_secmem() only enforces that the secure heap is used for 52 allocated from the secure heap. In cases where it is desirable to ensure 53 that the contents of the PEM file only appears in memory from the secure heap,
|
H A D | BIO_ADDR.pod | 89 returned string has been allocated on the heap and must be freed 96 returned string has been allocated on the heap and must be freed 102 on the heap and must be freed with OPENSSL_free().
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_read_support_format_iso9660.c | 447 static int heap_add_entry(struct archive_read *a, struct heap_queue *heap, 449 static struct file_info *heap_get_entry(struct heap_queue *heap); 2369 struct read_ce_queue *heap; in register_CE() local 2389 heap = &(iso9660->read_ce_req); in register_CE() 2390 if (heap->cnt >= heap->allocated) { in register_CE() 2393 if (heap->allocated < 16) in register_CE() 2396 new_size = heap->allocated * 2; in register_CE() 2398 if (new_size <= heap->allocated) { in register_CE() 2407 if (heap->reqs != NULL) { in register_CE() 2408 memcpy(p, heap->reqs, heap->cnt * sizeof(*p)); in register_CE() [all …]
|
H A D | archive_write_set_format_xar.c | 998 struct heap_data *heap) in xmlwrite_heap() argument 1003 r = xmlwrite_fstring(a, writer, "length", "%ju", heap->length); in xmlwrite_heap() 1006 r = xmlwrite_fstring(a, writer, "offset", "%ju", heap->temp_offset); in xmlwrite_heap() 1009 r = xmlwrite_fstring(a, writer, "size", "%ju", heap->size); in xmlwrite_heap() 1012 switch (heap->compression) { in xmlwrite_heap() 1028 r = xmlwrite_sum(a, writer, "archived-checksum", &(heap->a_sum)); in xmlwrite_heap() 1031 r = xmlwrite_sum(a, writer, "extracted-checksum", &(heap->e_sum)); in xmlwrite_heap() 1208 struct heap_data *heap; in make_file_entry() local 1476 for (heap = file->xattr.first; heap != NULL; heap = heap->next) { in make_file_entry() 1491 "id", "%d", heap->id); in make_file_entry() [all …]
|
H A D | archive_read_support_format_xar.c | 1233 struct heap_queue *heap, struct xar_file *file) in heap_add_entry() argument 1239 if (heap->used >= heap->allocated) { in heap_add_entry() 1243 if (heap->allocated < 1024) in heap_add_entry() 1246 new_size = heap->allocated * 2; in heap_add_entry() 1248 if (new_size <= heap->allocated) { in heap_add_entry() 1260 if (heap->allocated) { in heap_add_entry() 1261 memcpy(new_pending_files, heap->files, in heap_add_entry() 1262 heap->allocated * sizeof(new_pending_files[0])); in heap_add_entry() 1263 free(heap->files); in heap_add_entry() 1265 heap->files = new_pending_files; in heap_add_entry() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/ |
H A D | hwasan_report.cpp | 486 heap(CopyHeapChunk()), in BaseReport() 503 } heap; member 516 ArrayRef<HeapAllocation> heap; member 555 const HeapChunk heap; member in __hwasan::__anon865875d10511::BaseReport 710 result.heap.is_allocated = true; in FindBufferOverflowCandidate() 711 result.heap.begin = chunk.Beg(); in FindBufferOverflowCandidate() 712 result.heap.end = chunk.End(); in FindBufferOverflowCandidate() 713 result.heap.thread_id = chunk.GetAllocThreadId(); in FindBufferOverflowCandidate() 714 result.heap.stack_id = chunk.GetAllocStackId(); in FindBufferOverflowCandidate() 721 if (candidate.heap.is_allocated) { in PrintHeapOrGlobalCandidate() [all …]
|
/freebsd/lib/libc/tests/secure/ |
H A D | generate-fortify-tests.lua | 1098 local function generate_test_name(func, variant, disposition, heap) 1103 if heap then 1137 local function generate_stackframe(buftype, bufsize, disposition, heap, def) 1188 if not heap and buftype_elem then 1198 if heap then 1215 if heap then 1245 local function write_test(fh, func, disposition, heap, def) 1246 local testname = generate_test_name(func, def.variant, disposition, heap) 1251 if def.exclude and def.exclude(disposition, heap) then 1259 if heap then [all …]
|
/freebsd/contrib/ofed/opensm/opensm/ |
H A D | osm_ucast_dfsssp.c | 186 static inline uint32_t heap_smaller(binary_heap_t * heap, uint32_t i, in heap_smaller() argument 189 return (heap->nodes[i]->distance < heap->nodes[j]->distance) ? 1 : 0; in heap_smaller() 193 static void heap_exchange(binary_heap_t * heap, uint32_t i, uint32_t j) in heap_exchange() argument 199 tmp_heap_id = heap->nodes[i]->heap_id; in heap_exchange() 200 heap->nodes[i]->heap_id = heap->nodes[j]->heap_id; in heap_exchange() 201 heap->nodes[j]->heap_id = tmp_heap_id; in heap_exchange() 203 tmp_node = heap->nodes[i]; in heap_exchange() 204 heap->nodes[i] = heap->nodes[j]; in heap_exchange() 205 heap->nodes[j] = tmp_node; in heap_exchange() 209 static uint32_t heap_up(binary_heap_t * heap, uint32_t i) in heap_up() argument [all …]
|
/freebsd/sys/contrib/zlib/ |
H A D | trees.c | 488 top = s->heap[SMALLEST]; \ 489 s->heap[SMALLEST] = s->heap[s->heap_len--]; \ 508 int v = s->heap[k]; in pqdownheap() 513 smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) { in pqdownheap() 517 if (smaller(tree, v, s->heap[j], s->depth)) break; in pqdownheap() 520 s->heap[k] = s->heap[j]; k = j; in pqdownheap() 525 s->heap[k] = v; in pqdownheap() 557 tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ in gen_bitlen() 560 n = s->heap[h]; in gen_bitlen() 601 m = s->heap[--h]; in gen_bitlen() [all …]
|
/freebsd/stand/efi/loader/ |
H A D | efi_main.c | 33 static EFI_PHYSICAL_ADDRESS heap; variable 41 BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize)); in efi_exit() 98 EFI_SIZE_TO_PAGES(heapsize), &heap); in efi_main() 104 setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); in efi_main()
|
/freebsd/stand/powerpc/ofw/ |
H A D | main.c | 59 static char heap[HEAP_SIZE]; // In BSS, so uses no space variable 76 bzero(heap, HEAP_SIZE); in init_heap() 78 setheap(heap, (void *)((uintptr_t)heap + HEAP_SIZE)); in init_heap()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_descriptions.h | 200 HeapAddressDescription heap; member 225 return data.heap.addr; in Address() 241 return data.heap.Print(); 257 return data.kind == kAddressKindHeap ? &data.heap : nullptr; in AsHeap()
|
H A D | asan_debugging.cpp | 102 } else if (auto heap = descr.AsHeap()) { in __asan_locate_address() local 104 region_address = heap->chunk_access.chunk_begin; in __asan_locate_address() 105 region_size = heap->chunk_access.chunk_size; in __asan_locate_address()
|
H A D | asan_flags.inc | 32 "Minimal size (in bytes) of redzones around heap objects. " 35 "Maximal size (in bytes) of redzones around heap objects.") 111 "Poison (or not) the heap memory on [de]allocation. Zero value is useful " 115 "(default=true). This flag affects heap and global buffers, but not " 136 "If true, ASan tweaks a bunch of other flags (quarantine, redzone, heap "
|
/freebsd/stand/efi/boot1/ |
H A D | boot1.c | 55 static EFI_PHYSICAL_ADDRESS heap; variable 191 EFI_SIZE_TO_PAGES(heapsize), &heap); in efi_main() 199 setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); in efi_main() 297 BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize)); in efi_exit()
|
/freebsd/crypto/krb5/src/util/verto/ |
H A D | ev.c | 2248 downheap (ANHE *heap, int N, int k) in downheap() argument 2250 ANHE he = heap [k]; in downheap() 2251 ANHE *E = heap + N + HEAP0; in downheap() 2257 ANHE *pos = heap + DHEAP * (k - HEAP0) + HEAP0 + 1; in downheap() 2280 heap [k] = *minpos; in downheap() 2283 k = minpos - heap; in downheap() 2286 heap [k] = he; in downheap() 2298 downheap (ANHE *heap, int N, int k) in downheap() argument 2300 ANHE he = heap [k]; in downheap() 2309 c += c + 1 < N + HEAP0 && ANHE_at (heap [c]) > ANHE_at (heap [c + 1]) in downheap() [all …]
|
/freebsd/stand/i386/loader/ |
H A D | help.i386 | 11 heap 13 Requests debugging output from the heap manager. For debugging use
|
/freebsd/contrib/jemalloc/ |
H A D | ChangeLog | 55 - Fix a profiling biasing issue which could cause incorrect heap usage and 56 object counts. This issue existed in all previous releases with the heap 98 - Optimize internal data structures, including RB tree and pairing heap. 318 - Use pairing heap instead of red-black tree for extents_avail. (@djwatson) 667 - Fix large allocation to search starting in the optimal size class heap, 706 - Fix heap profiling context leaks in reallocation edge cases. (@jasone) 744 unlikely to cause deadlocks in practice except when heap profiling was 785 + Add raw heap profile support. (@jasone) 839 This bugfix release continues the trend of xallocx() and heap profiling fixes. 846 - Fix prof_tctx_dump_iter() to filter out nodes that were created after heap [all...] |
/freebsd/sys/netinet/ |
H A D | in_fib_dxr.c | 187 struct heap_entry heap[33]; member 345 struct heap_entry *fhp = &da->heap[0]; in initheap() 670 if (preflen > da->heap[i].preflen) in heap_inject() 672 else if (preflen < da->heap[i].preflen) in heap_inject() 673 da->heap[i + 1] = da->heap[i]; in heap_inject() 678 fhp = &da->heap[i + 1]; in heap_inject() 695 struct heap_entry *fhp = &da->heap[da->heap_index]; in dxr_walk() 768 fp->nexthop = da->heap[0].nexthop; in update_chunk() 780 fhp = &da->heap[da->heap_index]; in update_chunk()
|
/freebsd/contrib/llvm-project/openmp/runtime/src/ |
H A D | ompt-specific.cpp | 270 lwt->heap = 0; in __ompt_lw_taskteam_init() 284 link_lwt->heap = on_heap; in __ompt_lw_taskteam_link() 335 if (lwtask->heap) { in __ompt_lw_taskteam_unlink()
|