Home
last modified time | relevance | path

Searched refs:heap (Results 1 – 25 of 66) sorted by relevance

123

/AliOS-Things-master/components/py_engine/engine/extmod/
A Dmoduheapq.c53 heap->items[pos] = item; in uheapq_heap_siftdown()
58 mp_uint_t end_pos = heap->len; in uheapq_heap_siftup()
66 heap->items[pos] = heap->items[child_pos]; in uheapq_heap_siftup()
69 heap->items[pos] = item; in uheapq_heap_siftup()
76 uheapq_heap_siftdown(heap, 0, heap->len - 1); in mod_uheapq_heappush()
83 if (heap->len == 0) { in mod_uheapq_heappop()
86 mp_obj_t item = heap->items[0]; in mod_uheapq_heappop()
87 heap->len -= 1; in mod_uheapq_heappop()
88 heap->items[0] = heap->items[heap->len]; in mod_uheapq_heappop()
89 heap->items[heap->len] = MP_OBJ_NULL; // so we don't retain a pointer in mod_uheapq_heappop()
[all …]
A Dmodutimeq.c117 heap->items[pos] = heap->items[child_pos]; in utimeq_heap_siftup()
128 if (heap->len == heap->alloc) { in mod_utimeq_heappush()
136 utimeq_heap_siftdown(heap, 0, heap->len); in mod_utimeq_heappush()
137 heap->len++; in mod_utimeq_heappush()
144 if (heap->len == 0) { in mod_utimeq_heappop()
156 heap->len -= 1; in mod_utimeq_heappop()
157 heap->items[0] = heap->items[heap->len]; in mod_utimeq_heappop()
158 heap->items[heap->len].callback = MP_OBJ_NULL; // so we don't retain a pointer in mod_utimeq_heappop()
159 heap->items[heap->len].args = MP_OBJ_NULL; in mod_utimeq_heappop()
160 if (heap->len) { in mod_utimeq_heappop()
[all …]
A Dmoduasyncio.c55 mp_obj_task_t *heap; member
92 self->heap = (mp_obj_task_t *)mp_pairheap_new(task_lt); in task_queue_make_new()
98 if (self->heap == NULL) { in task_queue_peek()
101 return MP_OBJ_FROM_PTR(self->heap); in task_queue_peek()
116 …self->heap = (mp_obj_task_t *)mp_pairheap_push(task_lt, TASK_PAIRHEAP(self->heap), TASK_PAIRHEAP(t… in task_queue_push_sorted()
123 mp_obj_task_t *head = (mp_obj_task_t *)mp_pairheap_peek(task_lt, &self->heap->pairheap); in task_queue_pop_head()
127 self->heap = (mp_obj_task_t *)mp_pairheap_pop(task_lt, &self->heap->pairheap); in task_queue_pop_head()
135 … self->heap = (mp_obj_task_t *)mp_pairheap_delete(task_lt, &self->heap->pairheap, &task->pairheap); in task_queue_remove()
/AliOS-Things-master/components/mbedtls/library/
A Dmemory_buffer_alloc.c241 if( heap.buf == NULL || heap.first == NULL ) in buffer_alloc_calloc()
305 if( heap.total_used > heap.maximum_used ) in buffer_alloc_calloc()
306 heap.maximum_used = heap.total_used; in buffer_alloc_calloc()
363 if( heap.total_used > heap.maximum_used ) in buffer_alloc_calloc()
364 heap.maximum_used = heap.total_used; in buffer_alloc_calloc()
389 if( p < heap.buf || p >= heap.buf + heap.len ) in buffer_alloc_free()
605 heap.first_free = heap.first; in mbedtls_memory_buffer_alloc_init()
634 heap.first != heap.first_free || in check_all_free()
635 (void *) heap.first != (void *) heap.buf ) in check_all_free()
679 end = heap.buf + heap.len; in mbedtls_memory_buffer_alloc_self_test()
[all …]
/AliOS-Things-master/hardware/chip/haas1000/drivers/utils/heap/
A Dmulti_heap_internal.h28 void *multi_heap_malloc_impl(multi_heap_handle_t heap, size_t size);
29 void multi_heap_free_impl(multi_heap_handle_t heap, void *p);
30 void *multi_heap_realloc_impl(multi_heap_handle_t heap, void *p, size_t size);
32 void multi_heap_get_info_impl(multi_heap_handle_t heap, multi_heap_info_t *info);
33 size_t multi_heap_free_size_impl(multi_heap_handle_t heap);
34 size_t multi_heap_minimum_free_size_impl(multi_heap_handle_t heap);
35 size_t multi_heap_get_allocated_size_impl(multi_heap_handle_t heap, void *p);
51 void multi_heap_internal_lock(multi_heap_handle_t heap);
53 void multi_heap_internal_unlock(multi_heap_handle_t heap);
58 multi_heap_block_handle_t multi_heap_get_first_block(multi_heap_handle_t heap);
[all …]
A Dmulti_heap.h41 void *multi_heap_malloc(multi_heap_handle_t heap, size_t size);
50 void multi_heap_free(multi_heap_handle_t heap, void *p);
62 void *multi_heap_realloc(multi_heap_handle_t heap, void *p, size_t size);
73 size_t multi_heap_get_allocated_size(multi_heap_handle_t heap, void *p);
101 void multi_heap_set_lock(multi_heap_handle_t heap, void* lock);
109 void multi_heap_dump(multi_heap_handle_t heap);
121 bool multi_heap_check(multi_heap_handle_t heap, bool print_errors);
135 size_t multi_heap_free_size(multi_heap_handle_t heap);
147 size_t multi_heap_minimum_free_size(multi_heap_handle_t heap);
168 void multi_heap_get_info(multi_heap_handle_t heap, multi_heap_info_t *info);
A Dheap_api.h48 void *heap_malloc(heap_handle_t heap, size_t size);
49 void heap_free(heap_handle_t heap, void *p);
50 void *heap_realloc(heap_handle_t heap, void *p, size_t size);
51 size_t heap_get_allocated_size(heap_handle_t heap, void *p);
52 void heap_set_lock(heap_handle_t heap, void* lock);
53 void heap_dump(heap_handle_t heap);
54 bool heap_check(heap_handle_t heap, bool print_errors);
55 size_t heap_free_size(heap_handle_t heap);
56 size_t heap_minimum_free_size(heap_handle_t heap);
57 void heap_get_info(heap_handle_t heap, multi_heap_info_t *info);
[all …]
/AliOS-Things-master/components/py_engine/engine/py/
A Dpairheap.h59 mp_pairheap_t *mp_pairheap_delete(mp_pairheap_lt_t lt, mp_pairheap_t *heap, mp_pairheap_t *node);
75 static inline bool mp_pairheap_is_empty(mp_pairheap_lt_t lt, mp_pairheap_t *heap) { in mp_pairheap_is_empty() argument
77 return heap == NULL; in mp_pairheap_is_empty()
81 static inline mp_pairheap_t *mp_pairheap_peek(mp_pairheap_lt_t lt, mp_pairheap_t *heap) { in mp_pairheap_peek() argument
83 return heap; in mp_pairheap_peek()
87 static inline mp_pairheap_t *mp_pairheap_push(mp_pairheap_lt_t lt, mp_pairheap_t *heap, mp_pairheap… in mp_pairheap_push() argument
89 return mp_pairheap_meld(lt, node, heap); // node is first to be stable in mp_pairheap_push()
93 static inline mp_pairheap_t *mp_pairheap_pop(mp_pairheap_lt_t lt, mp_pairheap_t *heap) { in mp_pairheap_pop() argument
94 assert(heap->next == NULL); in mp_pairheap_pop()
95 mp_pairheap_t *child = heap->child; in mp_pairheap_pop()
[all …]
A Dpairheap.c71 mp_pairheap_t *heap = NULL; in mp_pairheap_pairing() local
82 heap = mp_pairheap_meld(lt, heap, n1); in mp_pairheap_pairing()
84 heap->next = NULL; in mp_pairheap_pairing()
85 return heap; in mp_pairheap_pairing()
89 mp_pairheap_t *mp_pairheap_delete(mp_pairheap_lt_t lt, mp_pairheap_t *heap, mp_pairheap_t *node) { in mp_pairheap_delete() argument
91 if (node == heap) { in mp_pairheap_delete()
92 mp_pairheap_t *child = heap->child; in mp_pairheap_delete()
99 return heap; in mp_pairheap_delete()
118 return heap; in mp_pairheap_delete()
146 return heap; in mp_pairheap_delete()
/AliOS-Things-master/components/py_engine/engine/extmod/uasyncio/
A Dtask.py37 heap = None
47 heap = ph_meld(heap, n1)
48 return heap
53 if node is heap:
66 return heap
91 return heap
97 self.heap = None
107 self.heap = ph_meld(v, self.heap)
113 v = self.heap
114 self.heap = ph_pairing(self.heap.ph_child)
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/os/os_dep/include/
A Dtcm_heap.h43 #define HNEW(heap, type) \ argument
44 (type*)tcm_heap_allocmem(heap, sizeof(type))
46 #define HNEWVEC(heap, type, nelem) \ argument
47 (type*)tcm_heap_allocmem(heap, sizeof(type) * (nelem))
49 #define HDELETE(heap, type, mem) \ argument
50 tcm_heap_freemem(heap, mem, sizeof(type))
52 #define HDELETEVEC(heap, type, nelem, mem) \ argument
53 tcm_heap_freemem(heap, mem, sizeof(type) * (nelem))
/AliOS-Things-master/components/minilibc/include/
A Dmm.h372 #define mm_seminitialize(heap) argument
373 #define mm_takesemaphore(heap) argument
374 #define mm_trysemaphore(heap) argument
375 #define mm_givesemaphore(heap) argument
458 int mm_max_usedsize_update(struct mm_heap_s *heap);
479 void *mm_realloc(struct mm_heap_s *heap, void *oldmem,
500 void *mm_zalloc(struct mm_heap_s *heap, size_t size);
527 void *mm_brkaddr(struct mm_heap_s *heap, int region);
545 void *mm_sbrk(struct mm_heap_s *heap, intptr_t incr,
590 void mm_shrinkchunk(struct mm_heap_s *heap,
[all …]
/AliOS-Things-master/components/amp/engine/duktape_engine/duktape/
A Dduktape.c21995 heap = thr->heap; in duk_debugger_attach()
22255 heap = thr->heap; in duk_destroy_heap()
22282 heap = thr->heap; in duk_suspend()
22317 heap = thr->heap; in duk_resume()
22692 heap = thr->heap; in duk_get_memory_functions()
22704 heap = thr->heap; in duk_gc()
28470 heap = thr->heap; in duk_push_heap_stash()
50920 heap = thr->heap;
50968 heap = thr->heap;
50990 heap = thr->heap;
[all …]
/AliOS-Things-master/components/py_engine/adapter/haas510/
A Dmain.c42 static char *heap = NULL; variable
251 heap = (char *)malloc(MICROPY_GC_HEAP_SIZE); in mpy_init()
252 if(NULL == heap){ in mpy_init()
256 gc_init(heap, heap + MICROPY_GC_HEAP_SIZE); in mpy_init()
301 if(NULL != heap){ in mpy_deinit()
303 free(heap); in mpy_deinit()
304 heap == NULL; in mpy_deinit()
/AliOS-Things-master/components/py_engine/adapter/haas600/
A Dmain.c42 static char *heap = NULL; variable
251 heap = (char *)malloc(MICROPY_GC_HEAP_SIZE); in mpy_init()
252 if(NULL == heap){ in mpy_init()
256 gc_init(heap, heap + MICROPY_GC_HEAP_SIZE); in mpy_init()
301 if(NULL != heap){ in mpy_deinit()
303 free(heap); in mpy_deinit()
304 heap == NULL; in mpy_deinit()
/AliOS-Things-master/components/amp-utility/python/
A Duheapq.py15 def heappush(heap, item): argument
21 def heappop(heap): argument
/AliOS-Things-master/components/SDL2/src/image/external/zlib-1.2.11/
A Dtrees.c432 top = s->heap[SMALLEST]; \
433 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
456 int v = s->heap[k];
461 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
468 s->heap[k] = s->heap[j]; k = j;
473 s->heap[k] = v;
511 n = s->heap[h];
552 m = s->heap[--h];
669 s->heap[--(s->heap_max)] = m;
683 s->heap[SMALLEST] = node++;
[all …]
/AliOS-Things-master/components/py_engine/external/unzip/src/
A Dtrees.c440 top = s->heap[SMALLEST]; \
441 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
464 int v = s->heap[k];
469 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
476 s->heap[k] = s->heap[j]; k = j;
481 s->heap[k] = v;
519 n = s->heap[h];
560 m = s->heap[--h];
677 s->heap[--(s->heap_max)] = m;
691 s->heap[SMALLEST] = node++;
[all …]
/AliOS-Things-master/components/py_engine/adapter/
A Dmain.c45 static int8_t *heap = NULL; variable
423 heap = (int8_t *)malloc(MICROPY_GC_HEAP_SIZE); in mpy_init()
424 if (NULL == heap) { in mpy_init()
428 gc_init(heap, heap + MICROPY_GC_HEAP_SIZE); in mpy_init()
470 if (NULL != heap) { in mpy_deinit()
471 free(heap); in mpy_deinit()
472 heap == NULL; in mpy_deinit()
/AliOS-Things-master/hardware/chip/haas1000/drivers/services/
A DMakefile13 ../utils/crc32/ ../utils/heap/ norflash_api/ overlay/
23 ../utils/heap/ \
173 ../utils/crc32/ ../utils/heap/ norflash_api/ overlay/
183 ../utils/heap/ \
/AliOS-Things-master/components/py_engine/tests/net_inet/
A Dtls_num_errors.py.exp1 heap is locked
/AliOS-Things-master/hardware/chip/haas1000/drivers/services/ble_stack/ke/src/
A Dke_env.h36 struct mblock_free * heap[KE_MEM_BLOCK_MAX]; member
/AliOS-Things-master/hardware/chip/haas1000/drivers/services/osif/
A DMakefile12 -Iutils/heap \
/AliOS-Things-master/hardware/chip/haas1000/drivers/services/ble_stack/ke/api/
A Dke_mem.h42 void ke_mem_init(uint8_t type, uint8_t* heap, uint16_t heap_size);
/AliOS-Things-master/components/py_engine/engine/mpy-cross/
A Dmain.c189 char *heap = malloc(heap_size); in main_() local
190 gc_init(heap, heap + heap_size); in main_()

Completed in 295 milliseconds

123