Home
last modified time | relevance | path

Searched full:heap (Results 1 – 25 of 573) sorted by relevance

12345678910>>...23

/freebsd-src/contrib/ntp/sntp/libevent/test/
H A Dregress_minheap.c44 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-src/contrib/libevent/test/
H A Dregress_minheap.c44 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-src/crypto/openssl/doc/man3/
H A DOPENSSL_secure_malloc.pod11 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 DPEM_bytes_read_bio.pod43 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-src/contrib/bzip2/
H A Dhuffman.c36 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-src/sys/netpfil/ipfw/
H A Ddn_heap.h30 * 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 Ddn_heap.c30 * 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 Ddn_sched_wf2q.c101 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-src/secure/lib/libcrypto/man/man3/
H A DOPENSSL_secure_malloc.3146 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-src/contrib/sendmail/libsm/
H A Dheap.html11 <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 &lt;sm/heap.h&gt;
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 Dt-heap.c11 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-src/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_report.cpp183 // 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()),
503 } heap;
516 ArrayRef<HeapAllocation> heap;
555 const HeapChunk heap; in CopyShadow()
658 // Scan all threads' ring buffers to find if it's a heap-use-after-free. in FindBufferOverflowCandidate()
682 // Check if this looks like a heap buffer overflow by scanning in PrintHeapOrGlobalCandidate()
710 result.heap.is_allocated = true; in PrintHeapOrGlobalCandidate()
711 result.heap in PrintHeapOrGlobalCandidate()
465 } heap; global() member
478 ArrayRef<HeapAllocation> heap; global() member
517 const HeapChunk heap; global() member in __hwasan::__anon2cbd70630511::BaseReport
[all...]
/freebsd-src/contrib/llvm-project/llvm/lib/Analysis/
H A DInlineOrder.cpp226 // pushed right back into the heap. For simplicity, those cases where the in pop_heap_adjust()
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);
244 size_t size() override { return Heap.size(); } in push()
250 Heap in push()
272 SmallVector<CallBase *, 16> Heap; global() member in __anon8bc167500111::PriorityInlineOrder
[all...]
/freebsd-src/sys/cam/
H A Dcam_queue.c57 * 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-src/contrib/libarchive/libarchive/
H A Darchive_read_support_format_iso9660.c76 * 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, in archive_read_support_format_iso9660()
449 static struct file_info *heap_get_entry(struct heap_queue *heap); in archive_read_support_format_iso9660()
1424 * this entry was added to the heap after we passed in zisofs_read_data()
2369 struct read_ce_queue *heap; in next_CE()
2389 heap = &(iso9660->read_ce_req); in read_CE()
2390 if (heap->cnt >= heap->allocated) { in read_CE() local
2393 if (heap in read_CE()
2277 struct read_ce_queue *heap; register_CE() local
2345 next_CE(struct read_ce_queue * heap) next_CE() argument
3011 heap_add_entry(struct archive_read * a,struct heap_queue * heap,struct file_info * file,uint64_t key) heap_add_entry() argument
3073 heap_get_entry(struct heap_queue * heap) heap_get_entry() argument
[all...]
H A Darchive_write_set_format_xar.c975 struct heap_data *heap) in xmlwrite_heap() argument
980 r = xmlwrite_fstring(a, writer, "length", "%ju", heap->length); in xmlwrite_heap()
983 r = xmlwrite_fstring(a, writer, "offset", "%ju", heap->temp_offset); in xmlwrite_heap()
986 r = xmlwrite_fstring(a, writer, "size", "%ju", heap->size); in xmlwrite_heap()
989 switch (heap->compression) { in xmlwrite_heap()
1005 r = xmlwrite_sum(a, writer, "archived-checksum", &(heap->a_sum)); in xmlwrite_heap()
1008 r = xmlwrite_sum(a, writer, "extracted-checksum", &(heap->e_sum)); in xmlwrite_heap()
1154 struct heap_data *heap; in make_file_entry() local
1432 for (heap = file->xattr.first; heap ! in make_file_entry()
1982 struct heap_data *heap, *next_heap; file_free() local
3130 struct heap_data *heap; save_xattrs() local
[all...]
/freebsd-src/contrib/ofed/opensm/opensm/
H A Dosm_ucast_dfsssp.c94 /* 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-src/contrib/llvm-project/compiler-rt/lib/asan/
H A Dasan_malloc_win.cpp204 #define OWNED_BY_RTL(heap, memory) \ argument
205 (!__sanitizer_get_ownership(memory) && HeapValidate(heap, 0, memory))
211 // interception takes place, so if it is not owned by the RTL heap we can in INTERCEPTOR_WINAPI()
212 // pass it to the ASAN heap for inspection. in INTERCEPTOR_WINAPI()
217 CHECK(dwFlags == 0 && "unsupported heap flags"); in INTERCEPTOR_WINAPI()
255 // Heap allocations happen before this function is hooked, so we must fall in INTERCEPTOR_WINAPI()
256 // back to the original function if the pointer is not from the ASAN heap, in INTERCEPTOR_WINAPI()
298 // If this heap block which was allocated before the ASAN in SharedReAlloc()
397 // However, hooking them is necessary to hook Windows heap
400 // are part of the heap's public interface.
[all …]
H A Dasan_descriptions.h177 // 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-src/share/doc/papers/malloc/
H A Dintro.ms21 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-src/sys/contrib/zlib/
H A Dtrees.c88 * 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-src/contrib/llvm-project/lldb/include/lldb/Utility/
H A DDataBufferHeap.h22 /// 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-src/stand/efi/loader/
H A Defi_main.c33 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-src/lib/libc/stdlib/
H A Dheapsort.c76 * 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-src/contrib/jemalloc/
H A DChangeLog218 - 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 …]

12345678910>>...23