Searched refs:heap (Results 1 - 25 of 174) sorted by relevance

1234567

/netbsd-current/external/mpl/bind/dist/lib/isc/
H A Dheap.c1 /* $NetBSD: heap.c,v 1.7 2023/01/25 21:43:31 christos Exp $ */
28 #include <isc/heap.h>
37 * element of the heap array is not used; i.e. heap subscripts are 1-based,
51 * When the heap is in a consistent state, the following invariant
57 !heap->compare(heap->array[(i)], heap->array[heap_parent(i)]))
59 /*% ISC heap structure. */
73 heap_check(isc_heap_t *heap) { argument
86 isc_heap_t *heap; local
111 isc_heap_t *heap; local
127 resize(isc_heap_t *heap) argument
145 float_up(isc_heap_t *heap, unsigned int i, void *elt) argument
166 sink_down(isc_heap_t *heap, unsigned int i, void *elt) argument
197 isc_heap_insert(isc_heap_t *heap, void *elt) argument
214 isc_heap_delete(isc_heap_t *heap, unsigned int idx) argument
245 isc_heap_increased(isc_heap_t *heap, unsigned int idx) argument
253 isc_heap_decreased(isc_heap_t *heap, unsigned int idx) argument
261 isc_heap_element(isc_heap_t *heap, unsigned int idx) argument
273 isc_heap_foreach(isc_heap_t *heap, isc_heapaction_t action, void *uap) argument
[all...]
/netbsd-current/external/mpl/dhcp/bind/dist/lib/isc/
H A Dheap.c1 /* $NetBSD: heap.c,v 1.1 2024/02/18 20:57:49 christos Exp $ */
28 #include <isc/heap.h>
37 * element of the heap array is not used; i.e. heap subscripts are 1-based,
51 * When the heap is in a consistent state, the following invariant
57 !heap->compare(heap->array[(i)], heap->array[heap_parent(i)]))
59 /*% ISC heap structure. */
73 heap_check(isc_heap_t *heap) { argument
86 isc_heap_t *heap; local
111 isc_heap_t *heap; local
127 resize(isc_heap_t *heap) argument
145 float_up(isc_heap_t *heap, unsigned int i, void *elt) argument
166 sink_down(isc_heap_t *heap, unsigned int i, void *elt) argument
197 isc_heap_insert(isc_heap_t *heap, void *elt) argument
214 isc_heap_delete(isc_heap_t *heap, unsigned int idx) argument
245 isc_heap_increased(isc_heap_t *heap, unsigned int idx) argument
253 isc_heap_decreased(isc_heap_t *heap, unsigned int idx) argument
261 isc_heap_element(isc_heap_t *heap, unsigned int idx) argument
273 isc_heap_foreach(isc_heap_t *heap, isc_heapaction_t action, void *uap) argument
[all...]
/netbsd-current/external/bsd/ntp/dist/lib/isc/
H A Dheap.c1 /* $NetBSD: heap.c,v 1.5 2020/05/25 20:47:20 christos Exp $ */
34 #include <isc/heap.h>
43 * element of the heap array is not used; i.e. heap subscripts are 1-based,
57 * When the heap is in a consistent state, the following invariant
62 ! heap->compare(heap->array[(i)], \
63 heap->array[heap_parent(i)]))
65 /*% ISC heap structure. */
82 isc_heap_t *heap; local
110 isc_heap_t *heap; local
126 resize(isc_heap_t *heap) argument
148 float_up(isc_heap_t *heap, unsigned int i, void *elt) argument
166 sink_down(isc_heap_t *heap, unsigned int i, void *elt) argument
191 isc_heap_insert(isc_heap_t *heap, void *elt) argument
208 isc_heap_delete(isc_heap_t *heap, unsigned int index) argument
233 isc_heap_increased(isc_heap_t *heap, unsigned int index) argument
241 isc_heap_decreased(isc_heap_t *heap, unsigned int index) argument
249 isc_heap_element(isc_heap_t *heap, unsigned int index) argument
259 isc_heap_foreach(isc_heap_t *heap, isc_heapaction_t action, void *uap) argument
[all...]
/netbsd-current/external/gpl3/binutils/dist/gprofng/libcollector/
H A Dmemmgr.h28 void __collector_deleteHeap (Heap *heap);
33 void __collector_mmgr_init_mutex_locks (Heap *heap);
38 void *__collector_allocCSize (Heap *heap, unsigned sz, int log);
43 void __collector_freeCSize (Heap *heap, void *ptr, unsigned sz);
48 void *__collector_allocVSize (Heap *heap, unsigned sz);
53 * the same heap, otherwise returns allocVSize(heap, newsz);
57 void *__collector_reallocVSize (Heap *heap, void *ptr, unsigned newsz);
/netbsd-current/sys/arch/evbarm/stand/board/
H A Dgemini_mem.c55 * "bad" things can happen if the gzboot heap is in
63 uint32_t heap, size; local
68 heap = size - BOARD_HEAP_SIZE;
70 printf(">> RAM 0x%x - 0x%x, heap at 0x%x\n", 0, size - 1, heap);
71 setheap((void *)heap, (void *)(size - 1));
H A Dsmdk2410.c55 uint32_t start, size, heap; local
60 heap = (start + size) - BOARD_HEAP_SIZE;
62 printf(">> RAM 0x%x - 0x%x, heap at 0x%x\n",
63 start, (start + size) - 1, heap);
64 setheap((void *)heap, (void *)(heap + BOARD_HEAP_SIZE - 1));
H A Dts7200.c42 void *heap = (void *)(0x800000 - BOARD_HEAP_SIZE); local
43 setheap(heap, (void *)(0x800000 - 1));
H A Dintegrator_mem.c54 uint32_t heap, size; local
86 heap = size - BOARD_HEAP_SIZE;
88 printf(">> RAM 0x%x - 0x%x, heap at 0x%x\n", 0, size - 1, heap);
89 setheap((void *)heap, (void *)(size - 1));
/netbsd-current/external/bsd/libevent/dist/test/
H A Dregress_minheap.c45 check_heap(struct min_heap *heap) argument
48 for (i = 1; i < heap->n; ++i) {
50 tt_want(evutil_timercmp(&heap->p[i]->ev_timeout,
51 &heap->p[parent_idx]->ev_timeout, >=));
58 struct min_heap heap; local
63 min_heap_ctor_(&heap);
68 min_heap_push_(&heap, inserted[i]);
70 check_heap(&heap);
72 tt_assert(min_heap_size_(&heap) == 1024);
75 min_heap_erase_(&heap, inserte
[all...]
/netbsd-current/external/bsd/ntp/dist/sntp/libevent/test/
H A Dregress_minheap.c46 check_heap(struct min_heap *heap) argument
49 for (i = 1; i < heap->n; ++i) {
51 tt_want(evutil_timercmp(&heap->p[i]->ev_timeout,
52 &heap->p[parent_idx]->ev_timeout, >=));
59 struct min_heap heap; local
64 min_heap_ctor_(&heap);
70 min_heap_push_(&heap, inserted[i]);
72 check_heap(&heap);
74 tt_assert(min_heap_size_(&heap) == 1024);
77 min_heap_erase_(&heap, inserte
[all...]
/netbsd-current/external/mpl/dhcp/dist/includes/
H A Dheap.h1 /* $NetBSD: heap.h,v 1.2 2018/04/07 22:37:29 christos Exp $ */
20 /* Id: heap.h,v 1.3 2007/05/19 19:16:25 dhankins Exp */
25 /*! \file isc/heap.h */
34 * The index function allows the client of the heap to receive a callback
37 * from the heap require the index be provided.
42 * The heapaction function is used when iterating over the heap.
44 * NOTE: The heap structure CANNOT BE MODIFIED during the call to
56 * \brief Create a new heap. The heap is implemented using a space-efficient
57 * storage method. When the heap element
[all...]
/netbsd-current/external/mpl/dhcp/bind/dist/lib/isc/include/isc/
H A Dheap.h1 /* $NetBSD: heap.h,v 1.1 2024/02/18 20:57:52 christos Exp $ */
19 /*! \file isc/heap.h */
35 * The index function allows the client of the heap to receive a callback
38 * from the heap require the index be provided.
43 * The heapaction function is used when iterating over the heap.
45 * NOTE: The heap structure CANNOT BE MODIFIED during the call to
57 * \brief Create a new heap. The heap is implemented using a space-efficient
58 * storage method. When the heap elements are deleted space is not freed
71 * heap
[all...]
/netbsd-current/external/mpl/bind/dist/lib/isc/include/isc/
H A Dheap.h1 /* $NetBSD: heap.h,v 1.7 2024/02/21 22:52:30 christos Exp $ */
18 /*! \file isc/heap.h */
34 * The index function allows the client of the heap to receive a callback
37 * from the heap require the index be provided.
42 * The heapaction function is used when iterating over the heap.
44 * NOTE: The heap structure CANNOT BE MODIFIED during the call to
56 * \brief Create a new heap. The heap is implemented using a space-efficient
57 * storage method. When the heap elements are deleted space is not freed
70 * heap
[all...]
/netbsd-current/tests/usr.bin/c++/
H A Dt_asan_heap_overflow.sh44 asan_test_case heap_overflow "Heap Overflow example" heap-buffer-overflow
H A Dt_asan_uaf.sh43 asan_test_case uaf "Use After Free example" heap-use-after-free
/netbsd-current/tests/usr.bin/cc/
H A Dt_asan_heap_overflow.sh44 asan_test_case heap_overflow "Heap Overflow example" heap-buffer-overflow
H A Dt_asan_uaf.sh43 asan_test_case uaf "Use After Free example" heap-use-after-free
/netbsd-current/external/mit/libuv/dist/src/
H A Dheap-inl.h33 /* A binary min heap. The usual properties hold: the root is the lowest
37 * The heap function try hard to detect corrupted tree nodes at the cost
40 struct heap { struct
50 HEAP_EXPORT(void heap_init(struct heap* heap));
51 HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap));
52 HEAP_EXPORT(void heap_insert(struct heap* heap,
55 HEAP_EXPORT(void heap_remove(struct heap* hea
62 HEAP_EXPORT(void heap_init(struct heap* heap)) argument
67 HEAP_EXPORT(struct heap_node* heap_min(const struct heap* heap)) argument
72 heap_node_swap(struct heap* heap, struct heap_node* parent, struct heap_node* child) argument
106 HEAP_EXPORT(void heap_insert(struct heap* heap, struct heap_node* newnode, heap_compare_fn less_than)) argument
150 HEAP_EXPORT(void heap_remove(struct heap* heap, struct heap_node* node, heap_compare_fn less_than)) argument
239 HEAP_EXPORT(void heap_dequeue(struct heap* heap, heap_compare_fn less_than)) argument
[all...]
/netbsd-current/sys/external/bsd/drm/dist/shared-core/
H A Dradeon_mem.c83 static struct mem_block *alloc_block(struct mem_block *heap, int size, argument
89 list_for_each(p, heap) {
98 static struct mem_block *find_block(struct mem_block *heap, int start) argument
102 list_for_each(p, heap)
114 * 'heap' to stop it being subsumed.
133 /* Initialize. How to check for an uninitialized heap?
135 static int init_heap(struct mem_block **heap, int start, int size) argument
142 *heap = drm_alloc(sizeof(**heap), DRM_MEM_BUFS);
143 if (!*heap) {
161 radeon_mem_release(struct drm_file *file_priv, struct mem_block *heap) argument
189 radeon_mem_takedown(struct mem_block **heap) argument
224 struct mem_block *block, **heap; local
259 struct mem_block *block, **heap; local
285 struct mem_block **heap; local
[all...]
/netbsd-current/external/gpl3/binutils/dist/libiberty/
H A Dfibheap.c1 /* A Fibonacci heap datatype.
56 /* Create a new fibonacci heap. */
63 /* Create a new fibonacci heap node. */
77 fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
87 fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
94 return fibheap_compare (heap, &a, b);
99 fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
111 fibheap_ins_root (heap, node);
115 if (heap->min == NULL || node->key < heap
86 fibheap_comp_data(fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b) argument
98 fibheap_insert(fibheap_t heap, fibheapkey_t key, void *data) argument
124 fibheap_min(fibheap_t heap) argument
134 fibheap_min_key(fibheap_t heap) argument
178 fibheap_extract_min(fibheap_t heap) argument
198 fibheap_replace_key_data(fibheap_t heap, fibnode_t node, fibheapkey_t key, void *data) argument
240 fibheap_replace_data(fibheap_t heap, fibnode_t node, void *data) argument
247 fibheap_replace_key(fibheap_t heap, fibnode_t node, fibheapkey_t key) argument
256 fibheap_delete_node(fibheap_t heap, fibnode_t node) argument
274 fibheap_delete(fibheap_t heap) argument
284 fibheap_empty(fibheap_t heap) argument
291 fibheap_extr_min_node(fibheap_t heap) argument
327 fibheap_ins_root(fibheap_t heap, fibnode_t node) argument
346 fibheap_rem_root(fibheap_t heap, fibnode_t node) argument
356 fibheap_consolidate(fibheap_t heap) argument
417 fibheap_cut(fibheap_t heap, fibnode_t node, fibnode_t parent) argument
427 fibheap_cascading_cut(fibheap_t heap, fibnode_t y) argument
[all...]
/netbsd-current/external/gpl3/binutils.old/dist/libiberty/
H A Dfibheap.c1 /* A Fibonacci heap datatype.
56 /* Create a new fibonacci heap. */
63 /* Create a new fibonacci heap node. */
77 fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
87 fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
94 return fibheap_compare (heap, &a, b);
99 fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
111 fibheap_ins_root (heap, node);
115 if (heap->min == NULL || node->key < heap
86 fibheap_comp_data(fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b) argument
98 fibheap_insert(fibheap_t heap, fibheapkey_t key, void *data) argument
124 fibheap_min(fibheap_t heap) argument
134 fibheap_min_key(fibheap_t heap) argument
178 fibheap_extract_min(fibheap_t heap) argument
198 fibheap_replace_key_data(fibheap_t heap, fibnode_t node, fibheapkey_t key, void *data) argument
240 fibheap_replace_data(fibheap_t heap, fibnode_t node, void *data) argument
247 fibheap_replace_key(fibheap_t heap, fibnode_t node, fibheapkey_t key) argument
256 fibheap_delete_node(fibheap_t heap, fibnode_t node) argument
274 fibheap_delete(fibheap_t heap) argument
284 fibheap_empty(fibheap_t heap) argument
291 fibheap_extr_min_node(fibheap_t heap) argument
327 fibheap_ins_root(fibheap_t heap, fibnode_t node) argument
346 fibheap_rem_root(fibheap_t heap, fibnode_t node) argument
356 fibheap_consolidate(fibheap_t heap) argument
417 fibheap_cut(fibheap_t heap, fibnode_t node, fibnode_t parent) argument
427 fibheap_cascading_cut(fibheap_t heap, fibnode_t y) argument
[all...]
/netbsd-current/external/gpl3/gcc.old/dist/libiberty/
H A Dfibheap.c1 /* A Fibonacci heap datatype.
56 /* Create a new fibonacci heap. */
63 /* Create a new fibonacci heap node. */
77 fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
87 fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
94 return fibheap_compare (heap, &a, b);
99 fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
111 fibheap_ins_root (heap, node);
115 if (heap->min == NULL || node->key < heap
86 fibheap_comp_data(fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b) argument
98 fibheap_insert(fibheap_t heap, fibheapkey_t key, void *data) argument
124 fibheap_min(fibheap_t heap) argument
134 fibheap_min_key(fibheap_t heap) argument
178 fibheap_extract_min(fibheap_t heap) argument
198 fibheap_replace_key_data(fibheap_t heap, fibnode_t node, fibheapkey_t key, void *data) argument
240 fibheap_replace_data(fibheap_t heap, fibnode_t node, void *data) argument
247 fibheap_replace_key(fibheap_t heap, fibnode_t node, fibheapkey_t key) argument
256 fibheap_delete_node(fibheap_t heap, fibnode_t node) argument
274 fibheap_delete(fibheap_t heap) argument
284 fibheap_empty(fibheap_t heap) argument
291 fibheap_extr_min_node(fibheap_t heap) argument
327 fibheap_ins_root(fibheap_t heap, fibnode_t node) argument
346 fibheap_rem_root(fibheap_t heap, fibnode_t node) argument
356 fibheap_consolidate(fibheap_t heap) argument
417 fibheap_cut(fibheap_t heap, fibnode_t node, fibnode_t parent) argument
427 fibheap_cascading_cut(fibheap_t heap, fibnode_t y) argument
[all...]
/netbsd-current/external/gpl3/gdb.old/dist/libiberty/
H A Dfibheap.c1 /* A Fibonacci heap datatype.
56 /* Create a new fibonacci heap. */
63 /* Create a new fibonacci heap node. */
77 fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
87 fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
94 return fibheap_compare (heap, &a, b);
99 fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
111 fibheap_ins_root (heap, node);
115 if (heap->min == NULL || node->key < heap
86 fibheap_comp_data(fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b) argument
98 fibheap_insert(fibheap_t heap, fibheapkey_t key, void *data) argument
124 fibheap_min(fibheap_t heap) argument
134 fibheap_min_key(fibheap_t heap) argument
178 fibheap_extract_min(fibheap_t heap) argument
198 fibheap_replace_key_data(fibheap_t heap, fibnode_t node, fibheapkey_t key, void *data) argument
240 fibheap_replace_data(fibheap_t heap, fibnode_t node, void *data) argument
247 fibheap_replace_key(fibheap_t heap, fibnode_t node, fibheapkey_t key) argument
256 fibheap_delete_node(fibheap_t heap, fibnode_t node) argument
274 fibheap_delete(fibheap_t heap) argument
284 fibheap_empty(fibheap_t heap) argument
291 fibheap_extr_min_node(fibheap_t heap) argument
327 fibheap_ins_root(fibheap_t heap, fibnode_t node) argument
346 fibheap_rem_root(fibheap_t heap, fibnode_t node) argument
356 fibheap_consolidate(fibheap_t heap) argument
417 fibheap_cut(fibheap_t heap, fibnode_t node, fibnode_t parent) argument
427 fibheap_cascading_cut(fibheap_t heap, fibnode_t y) argument
[all...]
/netbsd-current/external/gpl3/gcc/dist/libiberty/
H A Dfibheap.c1 /* A Fibonacci heap datatype.
56 /* Create a new fibonacci heap. */
63 /* Create a new fibonacci heap node. */
77 fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
87 fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
94 return fibheap_compare (heap, &a, b);
99 fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
111 fibheap_ins_root (heap, node);
115 if (heap->min == NULL || node->key < heap
86 fibheap_comp_data(fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b) argument
98 fibheap_insert(fibheap_t heap, fibheapkey_t key, void *data) argument
124 fibheap_min(fibheap_t heap) argument
134 fibheap_min_key(fibheap_t heap) argument
178 fibheap_extract_min(fibheap_t heap) argument
198 fibheap_replace_key_data(fibheap_t heap, fibnode_t node, fibheapkey_t key, void *data) argument
240 fibheap_replace_data(fibheap_t heap, fibnode_t node, void *data) argument
247 fibheap_replace_key(fibheap_t heap, fibnode_t node, fibheapkey_t key) argument
256 fibheap_delete_node(fibheap_t heap, fibnode_t node) argument
274 fibheap_delete(fibheap_t heap) argument
284 fibheap_empty(fibheap_t heap) argument
291 fibheap_extr_min_node(fibheap_t heap) argument
327 fibheap_ins_root(fibheap_t heap, fibnode_t node) argument
346 fibheap_rem_root(fibheap_t heap, fibnode_t node) argument
356 fibheap_consolidate(fibheap_t heap) argument
417 fibheap_cut(fibheap_t heap, fibnode_t node, fibnode_t parent) argument
427 fibheap_cascading_cut(fibheap_t heap, fibnode_t y) argument
[all...]
/netbsd-current/external/gpl3/gdb/dist/libiberty/
H A Dfibheap.c1 /* A Fibonacci heap datatype.
56 /* Create a new fibonacci heap. */
63 /* Create a new fibonacci heap node. */
77 fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
87 fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
94 return fibheap_compare (heap, &a, b);
99 fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
111 fibheap_ins_root (heap, node);
115 if (heap->min == NULL || node->key < heap
86 fibheap_comp_data(fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b) argument
98 fibheap_insert(fibheap_t heap, fibheapkey_t key, void *data) argument
124 fibheap_min(fibheap_t heap) argument
134 fibheap_min_key(fibheap_t heap) argument
178 fibheap_extract_min(fibheap_t heap) argument
198 fibheap_replace_key_data(fibheap_t heap, fibnode_t node, fibheapkey_t key, void *data) argument
240 fibheap_replace_data(fibheap_t heap, fibnode_t node, void *data) argument
247 fibheap_replace_key(fibheap_t heap, fibnode_t node, fibheapkey_t key) argument
256 fibheap_delete_node(fibheap_t heap, fibnode_t node) argument
274 fibheap_delete(fibheap_t heap) argument
284 fibheap_empty(fibheap_t heap) argument
291 fibheap_extr_min_node(fibheap_t heap) argument
327 fibheap_ins_root(fibheap_t heap, fibnode_t node) argument
346 fibheap_rem_root(fibheap_t heap, fibnode_t node) argument
356 fibheap_consolidate(fibheap_t heap) argument
417 fibheap_cut(fibheap_t heap, fibnode_t node, fibnode_t parent) argument
427 fibheap_cascading_cut(fibheap_t heap, fibnode_t y) argument
[all...]

Completed in 174 milliseconds

1234567