/external/skqp/tests/ |
D | VkHeapTests.cpp | 26 GrVkSubHeap heap(gpu, 0, 0, 64 * 1024, 32); in subheap_test() local 29 REPORTER_ASSERT(reporter, heap.alloc(64 * 1024, &alloc0)); in subheap_test() 32 REPORTER_ASSERT(reporter, heap.freeSize() == 0 && heap.largestBlockSize() == 0); in subheap_test() 33 heap.free(alloc0); in subheap_test() 34 REPORTER_ASSERT(reporter, heap.freeSize() == 64*1024 && heap.largestBlockSize() == 64 * 1024); in subheap_test() 37 REPORTER_ASSERT(reporter, heap.alloc(16 * 1024, &alloc0)); in subheap_test() 38 REPORTER_ASSERT(reporter, heap.alloc(23 * 1024, &alloc1)); in subheap_test() 39 REPORTER_ASSERT(reporter, heap.alloc(18 * 1024, &alloc2)); in subheap_test() 40 REPORTER_ASSERT(reporter, heap.freeSize() == 7 * 1024 && heap.largestBlockSize() == 7 * 1024); in subheap_test() 42 heap.free(alloc1); in subheap_test() [all …]
|
D | TDPQueueTest.cpp | 15 SkTDPQueue<int, intless> heap; in simple_test() local 16 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test() 18 heap.insert(0); in simple_test() 19 REPORTER_ASSERT(reporter, 1 == heap.count()); in simple_test() 20 REPORTER_ASSERT(reporter, 0 == heap.peek()); in simple_test() 21 heap.pop(); in simple_test() 22 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test() 24 heap.insert(0); in simple_test() 25 heap.insert(1); in simple_test() 26 REPORTER_ASSERT(reporter, 2 == heap.count()); in simple_test() [all …]
|
/external/skia/tests/ |
D | VkHeapTests.cpp | 26 GrVkSubHeap heap(gpu, 0, 0, 64 * 1024, 32); in subheap_test() local 29 REPORTER_ASSERT(reporter, heap.alloc(64 * 1024, &alloc0)); in subheap_test() 32 REPORTER_ASSERT(reporter, heap.freeSize() == 0 && heap.largestBlockSize() == 0); in subheap_test() 33 heap.free(alloc0); in subheap_test() 34 REPORTER_ASSERT(reporter, heap.freeSize() == 64*1024 && heap.largestBlockSize() == 64 * 1024); in subheap_test() 37 REPORTER_ASSERT(reporter, heap.alloc(16 * 1024, &alloc0)); in subheap_test() 38 REPORTER_ASSERT(reporter, heap.alloc(23 * 1024, &alloc1)); in subheap_test() 39 REPORTER_ASSERT(reporter, heap.alloc(18 * 1024, &alloc2)); in subheap_test() 40 REPORTER_ASSERT(reporter, heap.freeSize() == 7 * 1024 && heap.largestBlockSize() == 7 * 1024); in subheap_test() 42 heap.free(alloc1); in subheap_test() [all …]
|
D | TDPQueueTest.cpp | 15 SkTDPQueue<int, intless> heap; in simple_test() local 16 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test() 18 heap.insert(0); in simple_test() 19 REPORTER_ASSERT(reporter, 1 == heap.count()); in simple_test() 20 REPORTER_ASSERT(reporter, 0 == heap.peek()); in simple_test() 21 heap.pop(); in simple_test() 22 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test() 24 heap.insert(0); in simple_test() 25 heap.insert(1); in simple_test() 26 REPORTER_ASSERT(reporter, 2 == heap.count()); in simple_test() [all …]
|
/external/python/cpython2/Modules/ |
D | _heapqmodule.c | 36 _siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos) in _siftdown() argument 42 assert(PyList_Check(heap)); in _siftdown() 43 size = PyList_GET_SIZE(heap); in _siftdown() 51 newitem = PyList_GET_ITEM(heap, pos); in _siftdown() 54 parent = PyList_GET_ITEM(heap, parentpos); in _siftdown() 58 if (size != PyList_GET_SIZE(heap)) { in _siftdown() 65 parent = PyList_GET_ITEM(heap, parentpos); in _siftdown() 66 newitem = PyList_GET_ITEM(heap, pos); in _siftdown() 67 PyList_SET_ITEM(heap, parentpos, newitem); in _siftdown() 68 PyList_SET_ITEM(heap, pos, parent); in _siftdown() [all …]
|
/external/python/cpython3/Modules/ |
D | _heapqmodule.c | 12 siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos) in siftdown() argument 18 assert(PyList_Check(heap)); in siftdown() 19 size = PyList_GET_SIZE(heap); in siftdown() 27 arr = _PyList_ITEMS(heap); in siftdown() 35 if (size != PyList_GET_SIZE(heap)) { in siftdown() 42 arr = _PyList_ITEMS(heap); in siftdown() 53 siftup(PyListObject *heap, Py_ssize_t pos) in siftup() argument 59 assert(PyList_Check(heap)); in siftup() 60 endpos = PyList_GET_SIZE(heap); in siftup() 68 arr = _PyList_ITEMS(heap); in siftup() [all …]
|
/external/python/cpython2/Lib/ |
D | heapq.py | 140 def heappush(heap, item): argument 142 heap.append(item) 143 _siftdown(heap, 0, len(heap)-1) 145 def heappop(heap): argument 147 lastelt = heap.pop() # raises appropriate IndexError if heap is empty 148 if heap: 149 returnitem = heap[0] 150 heap[0] = lastelt 151 _siftup(heap, 0) 156 def heapreplace(heap, item): argument [all …]
|
/external/python/cpython3/Lib/ |
D | heapq.py | 130 def heappush(heap, item): argument 132 heap.append(item) 133 _siftdown(heap, 0, len(heap)-1) 135 def heappop(heap): argument 137 lastelt = heap.pop() # raises appropriate IndexError if heap is empty 138 if heap: 139 returnitem = heap[0] 140 heap[0] = lastelt 141 _siftup(heap, 0) 145 def heapreplace(heap, item): argument [all …]
|
/external/mesa3d/src/mesa/main/ |
D | mm.c | 34 mmDumpMemInfo(const struct mem_block *heap) in mmDumpMemInfo() argument 36 fprintf(stderr, "Memory heap %p:\n", (void *)heap); in mmDumpMemInfo() 37 if (heap == 0) { in mmDumpMemInfo() 42 for(p = heap->next; p != heap; p = p->next) { in mmDumpMemInfo() 50 for(p = heap->next_free; p != heap; p = p->next_free) { in mmDumpMemInfo() 63 struct mem_block *heap, *block; in mmInit() local 68 heap = calloc(1, sizeof(struct mem_block)); in mmInit() 69 if (!heap) in mmInit() 74 free(heap); in mmInit() 78 heap->next = block; in mmInit() [all …]
|
/external/mesa3d/src/gallium/auxiliary/util/ |
D | u_mm.c | 34 u_mmDumpMemInfo(const struct mem_block *heap) in u_mmDumpMemInfo() argument 36 debug_printf("Memory heap %p:\n", (void *) heap); in u_mmDumpMemInfo() 37 if (heap == NULL) { in u_mmDumpMemInfo() 44 for (p = heap->next; p != heap; p = p->next) { in u_mmDumpMemInfo() 58 for (p = heap->next_free; p != heap; p = p->next_free) { in u_mmDumpMemInfo() 72 struct mem_block *heap, *block; in u_mmInit() local 77 heap = CALLOC_STRUCT(mem_block); in u_mmInit() 78 if (!heap) in u_mmInit() 83 FREE(heap); in u_mmInit() 87 heap->next = block; in u_mmInit() [all …]
|
/external/libdrm/intel/ |
D | mm.c | 36 drm_private void mmDumpMemInfo(const struct mem_block *heap) in mmDumpMemInfo() argument 38 drmMsg("Memory heap %p:\n", (void *)heap); in mmDumpMemInfo() 39 if (heap == 0) { in mmDumpMemInfo() 44 for (p = heap->next; p != heap; p = p->next) { in mmDumpMemInfo() 52 for (p = heap->next_free; p != heap; p = p->next_free) { in mmDumpMemInfo() 64 struct mem_block *heap, *block; in mmInit() local 69 heap = (struct mem_block *)calloc(1, sizeof(struct mem_block)); in mmInit() 70 if (!heap) in mmInit() 75 free(heap); in mmInit() 79 heap->next = block; in mmInit() [all …]
|
/external/jemalloc/test/unit/ |
D | ph.c | 63 heap_print(const heap_t *heap) in heap_print() argument 67 malloc_printf("vvv heap %p vvv\n", heap); in heap_print() 68 if (heap->ph_root == NULL) in heap_print() 71 node_print(heap->ph_root, 0); in heap_print() 73 for (auxelm = phn_next_get(node_t, link, heap->ph_root); auxelm != NULL; in heap_print() 82 malloc_printf("^^^ heap %p ^^^\n", heap); in heap_print() 114 heap_validate(const heap_t *heap) in heap_validate() argument 119 if (heap->ph_root == NULL) in heap_validate() 122 nnodes += node_validate(heap->ph_root, NULL); in heap_validate() 124 for (auxelm = phn_next_get(node_t, link, heap->ph_root); auxelm != NULL; in heap_validate() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | heap_simulator_test.cc | 536 NoFragmentationStatsHeap heap; in TEST_F() local 537 EXPECT_EQ(0, heap.Finish().heap_size); in TEST_F() 541 NoFragmentationStatsHeap heap; in TEST_F() local 542 heap.Alloc(buffer_a_, 10); in TEST_F() 543 heap.Alloc(buffer_b_, 20); in TEST_F() 544 heap.Alloc(buffer_c_, 30); in TEST_F() 545 heap.Alloc(buffer_d_, 30); in TEST_F() 546 heap.Free(buffer_a_, 10); in TEST_F() 547 heap.Free(buffer_b_, 20); in TEST_F() 548 heap.Free(buffer_c_, 30); in TEST_F() [all …]
|
/external/deqp/framework/delibs/depool/ |
D | dePoolHeap.h | 67 DE_INLINE int TYPENAME##_getNumElements (const TYPENAME* heap) DE_UNUSED_FUNCTION; \ 68 DE_INLINE deBool TYPENAME##_reserve (DE_PTR_TYPE(TYPENAME) heap, int capacity) DE_UNUSED_FUNCTIO… 69 DE_INLINE void TYPENAME##_reset (DE_PTR_TYPE(TYPENAME) heap) DE_UNUSED_FUNCTION; \ 70 DE_INLINE void TYPENAME##_moveDown (DE_PTR_TYPE(TYPENAME) heap, int ndx) DE_UNUSED_FUNCTION; \ 71 DE_INLINE void TYPENAME##_moveUp (DE_PTR_TYPE(TYPENAME) heap, int ndx) DE_UNUSED_FUNCTION; \ 72 DE_INLINE deBool TYPENAME##_push (DE_PTR_TYPE(TYPENAME) heap, VALUETYPE elem) DE_UNUSED_FUNCTION… 73 DE_INLINE VALUETYPE TYPENAME##_popMin (DE_PTR_TYPE(TYPENAME) heap) DE_UNUSED_FUNCTION; \ 77 DE_PTR_TYPE(TYPENAME) heap = DE_POOL_NEW(pool, TYPENAME); \ 78 if (!heap) \ 80 heap->array = TYPENAME##Array_create(pool); \ [all …]
|
D | dePoolHeap.c | 62 TestHeap* heap = TestHeap_create(pool); in dePoolHeap_selfTest() local 65 TestHeap_push(heap, HeapItem_create(10, 10)); in dePoolHeap_selfTest() 66 TestHeap_push(heap, HeapItem_create(0, 10)); in dePoolHeap_selfTest() 67 TestHeap_push(heap, HeapItem_create(20, 10)); in dePoolHeap_selfTest() 68 DE_TEST_ASSERT(TestHeap_getNumElements(heap) == 3); in dePoolHeap_selfTest() 70 DE_TEST_ASSERT(TestHeap_popMin(heap).priority == 0); in dePoolHeap_selfTest() 71 DE_TEST_ASSERT(TestHeap_popMin(heap).priority == 10); in dePoolHeap_selfTest() 72 DE_TEST_ASSERT(TestHeap_popMin(heap).priority == 20); in dePoolHeap_selfTest() 73 DE_TEST_ASSERT(TestHeap_getNumElements(heap) == 0); in dePoolHeap_selfTest() 80 TestHeap_push(heap, HeapItem_create(i, -i)); in dePoolHeap_selfTest() [all …]
|
/external/mesa3d/src/gallium/drivers/nouveau/ |
D | nouveau_heap.c | 29 nouveau_heap_init(struct nouveau_heap **heap, in nouveau_heap_init() argument 40 *heap = r; in nouveau_heap_init() 45 nouveau_heap_destroy(struct nouveau_heap **heap) in nouveau_heap_destroy() argument 47 if (!*heap) in nouveau_heap_destroy() 49 free(*heap); in nouveau_heap_destroy() 50 *heap = NULL; in nouveau_heap_destroy() 54 nouveau_heap_alloc(struct nouveau_heap *heap, unsigned size, void *priv, in nouveau_heap_alloc() argument 59 if (!heap || !size || !res || *res) in nouveau_heap_alloc() 62 while (heap) { in nouveau_heap_alloc() 63 if (!heap->in_use && heap->size >= size) { in nouveau_heap_alloc() [all …]
|
/external/v8/src/heap/ |
D | incremental-marking-job.cc | 17 void IncrementalMarkingJob::Start(Heap* heap) { in Start() argument 18 DCHECK(!heap->incremental_marking()->IsStopped()); in Start() 19 ScheduleTask(heap); in Start() 24 void IncrementalMarkingJob::ScheduleTask(Heap* heap) { in ScheduleTask() argument 26 v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(heap->isolate()); in ScheduleTask() 28 auto task = new Task(heap->isolate(), this); in ScheduleTask() 33 void IncrementalMarkingJob::Task::Step(Heap* heap) { in Step() argument 36 heap->MonotonicallyIncreasingTimeInMs() + kIncrementalMarkingDelayMs; in Step() 37 heap->incremental_marking()->AdvanceIncrementalMarking( in Step() 40 heap->FinalizeIncrementalMarkingIfComplete( in Step() [all …]
|
D | mark-compact.cc | 50 MarkCompactCollector::MarkCompactCollector(Heap* heap) in MarkCompactCollector() argument 52 heap_(heap), in MarkCompactCollector() 62 marking_deque_(heap), in MarkCompactCollector() 64 sweeper_(heap) { in MarkCompactCollector() 97 static void VerifyMarking(Heap* heap, Address bottom, Address top) { in VerifyMarking() argument 105 object->map() != heap->one_pointer_filler_map()) { in VerifyMarking() 138 VerifyMarking(space->heap(), page->area_start(), limit); in VerifyMarking() 145 VerifyMarking(space->heap(), p->area_start(), p->area_end()); in VerifyMarking() 150 static void VerifyMarking(Heap* heap) { in VerifyMarking() argument 151 VerifyMarking(heap->old_space()); in VerifyMarking() [all …]
|
D | objects-visiting-inl.h | 217 Heap* heap, HeapObject* object, Address entry_address) { in VisitCodeEntry() argument 219 heap->mark_compact_collector()->RecordCodeEntrySlot(object, entry_address, in VisitCodeEntry() 221 StaticVisitor::MarkObject(heap, code); in VisitCodeEntry() 227 Heap* heap, RelocInfo* rinfo) { in VisitEmbeddedPointer() argument 231 heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, object); in VisitEmbeddedPointer() 236 StaticVisitor::MarkObject(heap, object); in VisitEmbeddedPointer() 242 void StaticMarkingVisitor<StaticVisitor>::VisitCell(Heap* heap, in VisitCell() argument 247 heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, cell); in VisitCell() 249 StaticVisitor::MarkObject(heap, cell); in VisitCell() 255 void StaticMarkingVisitor<StaticVisitor>::VisitDebugTarget(Heap* heap, in VisitDebugTarget() argument [all …]
|
D | scavenge-job.cc | 20 Heap* heap = isolate()->heap(); in RunInternal() local 24 double start_ms = heap->MonotonicallyIncreasingTimeInMs(); in RunInternal() 27 heap->tracer()->ScavengeSpeedInBytesPerMillisecond(); in RunInternal() 28 size_t new_space_size = heap->new_space()->Size(); in RunInternal() 29 size_t new_space_capacity = heap->new_space()->Capacity(); in RunInternal() 37 heap->CollectGarbage(NEW_SPACE, GarbageCollectionReason::kIdleTask); in RunInternal() 40 job_->RescheduleIdleTask(heap); in RunInternal() 80 void ScavengeJob::RescheduleIdleTask(Heap* heap) { in RescheduleIdleTask() argument 84 ScheduleIdleTask(heap); in RescheduleIdleTask() 90 void ScavengeJob::ScheduleIdleTaskIfNeeded(Heap* heap, int bytes_allocated) { in ScheduleIdleTaskIfNeeded() argument [all …]
|
D | memory-reducer.cc | 24 : CancelableTask(memory_reducer->heap()->isolate()), in TimerTask() 29 Heap* heap = memory_reducer_->heap(); in RunInternal() local 31 double time_ms = heap->MonotonicallyIncreasingTimeInMs(); in RunInternal() 32 heap->tracer()->SampleAllocation(time_ms, heap->NewSpaceAllocationCounter(), in RunInternal() 33 heap->OldGenerationAllocationCounter()); in RunInternal() 34 bool low_allocation_rate = heap->HasLowAllocationRate(); in RunInternal() 35 bool optimize_for_memory = heap->ShouldOptimizeForMemoryUsage(); in RunInternal() 37 heap->isolate()->PrintWithTimestamp( in RunInternal() 50 heap->incremental_marking()->IsStopped() && in RunInternal() 51 (heap->incremental_marking()->CanBeActivated() || optimize_for_memory); in RunInternal() [all …]
|
/external/libevent/test/ |
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 …]
|
/external/python/cpython2/Lib/test/ |
D | test_heapq.py | 33 heap = [] 35 self.check_invariant(heap) 39 self.module.heappush(heap, item) 40 self.check_invariant(heap) 42 while heap: 43 item = self.module.heappop(heap) 44 self.check_invariant(heap) 59 def check_invariant(self, heap): argument 61 for pos, item in enumerate(heap): 64 self.assertTrue(heap[parentpos] <= item) [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_heapq.py | 33 heap = [] 35 self.check_invariant(heap) 39 self.module.heappush(heap, item) 40 self.check_invariant(heap) 42 while heap: 43 item = self.module.heappop(heap) 44 self.check_invariant(heap) 59 def check_invariant(self, heap): argument 61 for pos, item in enumerate(heap): 64 self.assertTrue(heap[parentpos] <= item) [all …]
|
/external/bzip2/ |
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 …]
|