/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/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,
|
/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; \ 69 Nodes and heap entries run from 1. Entry 0 in BZ2_hbMakeCodeLengths() [all …]
|
/freebsd/sys/netpfil/ipfw/ |
H A D | dn_heap.h | 30 * Binary heap and hash tables, header file 40 * This module implements a binary heap supporting random extraction. 42 * A heap entry contains an uint64_t key and a pointer to object. 45 * The heap is a struct dn_heap plus a dynamically allocated 49 * The heap supports ordered insert, and extract from the top. 50 * To extract an object from the middle of the heap, we the object 52 * in the heap itself, and the location of this field must be 64 int ofs; /* offset in the object of heap index */ 74 * heap_init() reinitializes the heap setting the size and the offset 79 * for random extractions from the heap. [all …]
|
H A D | dn_heap.c | 30 * Binary heap and hash tables, used in dummynet 60 static MALLOC_DEFINE(M_DN_HEAP, "dummynet", "dummynet heap"); 63 * Heap management functions. 65 * In the heap, first node is element 0. Children of i are 2i+1 and 2i+2. 68 * heap_init() is called to expand the heap when needed. 118 * Insert element in heap. Normally, p != NULL, we insert p in 122 * Returns 1 on failure (cannot allocate new heap entry) 124 * If ofs > 0 the position (index, int) of the element in the heap is 175 * remove top element from heap, or obj if obj != NULL 196 * actually in this heap. */ in heap_extract() [all …]
|
H A D | dn_sched_wf2q.c | 101 int32_t heap_pos; /* position (index) of struct in heap */ 109 * WF2Q+ needs to drain entries from the idle heap so that we 113 * from the idle heap. 158 } else { /* if it was idle then it was in the idle heap */ in wf2qp_enqueue() 204 /* we have nothing to do. We could kill the idle heap in wf2qp_dequeue() 212 idle_check(si, 1, 0); /* drain something from the idle heap */ in wf2qp_dequeue() 248 heap_extract(sch, NULL); /* Remove queue from heap. */ in wf2qp_dequeue() 323 * otherwise remove it from the right heap and adjust the sum 333 return 0; /* nothing to do, not in any heap */ in wf2qp_free_queue() 338 /* extract from the heap. XXX TODO we may need to adjust V in wf2qp_free_queue()
|
/freebsd/secure/lib/libcrypto/man/man3/ |
H A D | OPENSSL_secure_malloc.3 | 146 CRYPTO_secure_used \- secure heap storage 180 information might be stored, OpenSSL supports the concept of a \*(L"secure heap.\*(R" 185 If a secure heap is used, then private key \fB\s-1BIGNUM\s0\fR values are stored there. 189 \&\fBCRYPTO_secure_malloc_init()\fR creates the secure heap, with the specified 191 allocate from the heap or zero to use a reasonable default value. 197 heap as been initialized and is available. 199 \&\fBCRYPTO_secure_malloc_done()\fR releases the heap and makes the memory unavailable 203 \&\fBOPENSSL_secure_malloc()\fR allocates \f(CW\*(C`num\*(C'\fR bytes from the heap. 213 \&\fBOPENSSL_secure_free()\fR releases the memory at \f(CW\*(C`ptr\*(C'\fR back to the heap. 224 the memory if it was not allocated from the secure heap. [all …]
|
/freebsd/contrib/sendmail/libsm/ |
H A D | heap.html | 11 <br> $Id: heap.html,v 1.9 2000-12-08 21:41:42 ca Exp $ 16 The heap package provides a layer of abstraction on top of 25 #include <sm/heap.h> 36 ** returning NULL on heap exhaustion. 78 It allocates <tt>size</tt> bytes of memory on the heap 89 In addition, if heap checking is enabled, then <tt>sm_malloc</tt> 122 If ptr is not NULL and heap checking is enabled, 141 If heap checking is disabled, then this function is equivalent 162 When heap checking is enabled, 163 the heap package maintains a hash table which associates the [all …]
|
H A D | t-heap.c | 11 SM_IDSTR(id, "@(#)$Id: t-heap.c,v 1.11 2013-11-22 20:51:43 ca Exp $") 14 #include <sm/heap.h> 33 sm_test_begin(argc, argv, "test heap handling"); 45 sm_dprintf("heap with 1 30-byte block allocated:\n"); 52 sm_dprintf("heap with 0 blocks allocated:\n");
|
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/ |
H A D | hwasan_report.cpp | 183 // Measure the number of heap ring buffer entries that would have matched in FindHeapAllocation() 192 // Measure the number of heap ring buffer entries that would have matched in FindHeapAllocation() 486 heap(CopyHeapChunk()), in BaseReport() 503 } heap; member 516 ArrayRef<HeapAllocation> heap; member 555 const HeapChunk heap; member in __hwasan::__anon865875d10511::BaseReport 658 // Scan all threads' ring buffers to find if it's a heap-use-after-free. in CopyAllocations() 682 // Check if this looks like a heap buffer overflow by scanning in FindBufferOverflowCandidate() 710 result.heap.is_allocated = true; in FindBufferOverflowCandidate() 711 result.heap.begin = chunk.Beg(); in FindBufferOverflowCandidate() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | InlineOrder.cpp | 226 // pushed right back into the heap. For simplicity, those cases where the 229 std::pop_heap(Heap.begin(), Heap.end(), isLess); in pop_heap_adjust() 230 while (updateAndCheckDecreased(Heap.back())) { in pop_heap_adjust() 231 std::push_heap(Heap.begin(), Heap.end(), isLess); in pop_heap_adjust() 232 std::pop_heap(Heap.begin(), Heap.end(), isLess); in pop_heap_adjust() 244 size_t size() override { return Heap.size(); } in size() 250 Heap.push_back(CB); in push() 252 std::push_heap(Heap.begin(), Heap.end(), isLess); in push() 260 CallBase *CB = Heap.pop_back_val(); in pop() 270 llvm::erase_if(Heap, PredWrapper); in erase_if() [all …]
|
/freebsd/sys/cam/ |
H A D | cam_queue.c | 57 * Heap algorithms like everything numbered from 1, so in camq_init() 99 * Heap algorithms like everything numbered from 1, so in camq_resize() 100 * remember that our pointer into the heap array is offset in camq_resize() 115 * the Heap(1, num_elements) property and array_size - num_elements >= 1, 116 * output Heap(1, num_elements+1) including new_entry in the array. 134 * Heap(1, num_elements) property and an index such that 1 <= index <= 135 * num_elements, remove that entry and restore the Heap(1, num_elements-1) 161 * Heap(1, num_entries) property, an index such that 1 <= index <= num_elements, 163 * element index and restore the Heap(0, num_elements) property. 289 * Heap routines for manipulating CAM queues. [all …]
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_read_support_format_iso9660.c | 76 * add them to the heap; if it's a regular file, I return the 266 uint64_t key; /* Heap Key. */ 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); 1424 * this entry was added to the heap after we passed in archive_read_format_iso9660_read_header() 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() [all …]
|
/freebsd/contrib/ofed/opensm/opensm/ |
H A D | osm_ucast_dfsssp.c | 94 /* for the binary heap */ 102 uint32_t size; /* size of the heap */ 183 /************ helper functions for heap in dijkstra ******************* 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() [all …]
|
/freebsd/sys/contrib/zlib/ |
H A D | trees.c | 88 * need for the L_CODES extra codes used during heap construction. However 479 /* Index within the heap array of least frequent node in the Huffman tree */ 483 * Remove the smallest element from the heap and recreate the heap with 484 * one less element. Updates heap and heap_len. 488 top = s->heap[SMALLEST]; \ 489 s->heap[SMALLEST] = s->heap[s->heap_len--]; \ 502 * Restore the heap property by moving down the tree starting at node k, 504 * when the heap property is re-established (each father smaller than its 508 int v = s->heap[k]; in pqdownheap() 513 smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) { in pqdownheap() [all …]
|
/freebsd/share/doc/papers/malloc/ |
H A D | intro.ms | 21 and the heap. 25 The heap starts at the end of the 54 The heap on the other hand has an explicit kernel-interface in the 58 heap to end. 61 taking an increment to the current end of the heap, but this is merely a
|
/freebsd/contrib/llvm-project/lldb/include/lldb/Utility/ |
H A D | DataBufferHeap.h | 22 /// A subclass of DataBuffer that stores a data buffer on the heap. 24 /// This class keeps its data in a heap based buffer that is owned by the 34 /// Initializes the heap based buffer with no bytes. 42 /// The number of bytes that heap based buffer should contain. 86 /// The size in bytes after this heap buffer was resized. If 121 buffer_t m_data; ///< The heap based buffer where data is stored
|
/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() 100 ST->ConOut->OutputString(ST->ConOut, (CHAR16 *)L"Failed to allocate memory for heap.\r\n"); in efi_main() 104 setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); in efi_main() 106 /* Start tslog now that we have a heap.*/ in efi_main()
|
/freebsd/lib/libc/stdlib/ |
H A D | heapsort.c | 76 * Build the list into a heap, where a heap is defined such that for 98 * Select the top of the heap and 'heapify'. Since by far the most expensive 105 * Then, starting from the *bottom* of the heap, finding k's correct place, 107 * is 'lost' when k is assigned its correct place in the heap. 184 * For each element of the heap, save the largest element into its in heapsort_b() 186 * heap. in heapsort_b()
|
/freebsd/contrib/jemalloc/ |
H A D | ChangeLog | 218 - Use pairing heap instead of red-black tree for extents_avail. (@djwatson) 567 - Fix large allocation to search starting in the optimal size class heap, 606 - Fix heap profiling context leaks in reallocation edge cases. (@jasone) 644 unlikely to cause deadlocks in practice except when heap profiling was 685 + Add raw heap profile support. (@jasone) 739 This bugfix release continues the trend of xallocx() and heap profiling fixes. 746 - Fix prof_tctx_dump_iter() to filter out nodes that were created after heap 753 This bugfix release addresses a few bugs specific to heap profiling. 769 optional extra space. Note that a couple of minor heap profiling 775 fast path when heap profiling is enabled. Additionally, split a special [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_descriptions.h | 177 // a shadow, global (variable), stack, or heap address. 180 // The proper access_size should be passed for stack, global, and heap 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()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_platform.h | 56 7200 0000 0000 - 7300 0000 0000: heap (1TB) 67 * HiAppMem contains the stack, loader, shared libraries and heap. 69 * Heap grows downwards (top-down). 102 fe00 0000 00 - ff00 0000 00: heap (4 GB) 129 0200 0000 00 - 0300 0000 00: heap (4 GB) 164 7a00 0000 00 - 7d00 0000 00: heap (12 GB) 195 3c000 0000 00 - 3f000 0000 00: heap (192 GB) 261 7ffe 0000 0000 - 7fff 0000 0000: heap 292 0f00 0000 0000 - 0f50 0000 0000: heap 325 3d00 0000 0000 - 3e00 0000 0000: heap [all...] |
/freebsd/lib/libc/tests/secure/ |
H A D | generate-fortify-tests.lua | 40 -- again with a buffer on the heap, to confirm that __builtin_object_size(3) can 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 1195 -- Heap tests obviously just put a pointer on the stack that 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) [all …]
|