/external/skia/tests/ |
D | VkHeapTests.cpp | 25 GrVkSubHeap heap(gpu, 0, 0, 64 * 1024, 32); in subheap_test() local 28 REPORTER_ASSERT(reporter, heap.alloc(64 * 1024, &alloc0)); in subheap_test() 31 REPORTER_ASSERT(reporter, heap.freeSize() == 0 && heap.largestBlockSize() == 0); in subheap_test() 32 heap.free(alloc0); in subheap_test() 33 REPORTER_ASSERT(reporter, heap.freeSize() == 64*1024 && heap.largestBlockSize() == 64 * 1024); in subheap_test() 36 REPORTER_ASSERT(reporter, heap.alloc(16 * 1024, &alloc0)); in subheap_test() 37 REPORTER_ASSERT(reporter, heap.alloc(23 * 1024, &alloc1)); in subheap_test() 38 REPORTER_ASSERT(reporter, heap.alloc(18 * 1024, &alloc2)); in subheap_test() 39 REPORTER_ASSERT(reporter, heap.freeSize() == 7 * 1024 && heap.largestBlockSize() == 7 * 1024); in subheap_test() 41 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/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/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/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 …]
|
D | objects-visiting.cc | 222 static bool MustRecordSlots(Heap* heap) { in MustRecordSlots() argument 223 return heap->gc_state() == Heap::MARK_COMPACT && in MustRecordSlots() 224 heap->mark_compact_collector()->is_compacting(); in MustRecordSlots() 233 Object* VisitWeakList(Heap* heap, Object* list, WeakObjectRetainer* retainer) { in VisitWeakList() argument 234 Object* undefined = heap->undefined_value(); in VisitWeakList() 237 MarkCompactCollector* collector = heap->mark_compact_collector(); in VisitWeakList() 238 bool record_slots = MustRecordSlots(heap); in VisitWeakList() 260 DCHECK(!retained->IsUndefined(heap->isolate())); in VisitWeakList() 265 WeakListVisitor<T>::VisitLiveObject(heap, tail, retainer); in VisitWeakList() 268 WeakListVisitor<T>::VisitPhantomObject(heap, candidate); in VisitWeakList() [all …]
|
D | incremental-marking.cc | 23 IncrementalMarking::IncrementalMarking(Heap* heap) in IncrementalMarking() argument 24 : heap_(heap), in IncrementalMarking() 67 isolate->heap()->incremental_marking()->RecordWrite(obj, slot, *slot); in RecordWriteFromCode() 75 IncrementalMarking* marking = isolate->heap()->incremental_marking(); in RecordWriteOfCodeEntryFromCode() 132 void IncrementalMarking::TransferMark(Heap* heap, HeapObject* from, in TransferMark() argument 139 if (!heap->incremental_marking()->IsMarking()) return; in TransferMark() 160 heap->mark_compact_collector()->marking_deque()->Push(to); in TransferMark() 161 heap->incremental_marking()->RestartIfNotMarking(); in TransferMark() 186 Heap* heap = map->GetHeap(); in VisitFixedArrayIncremental() local 199 VisitPointers(heap, object, HeapObject::RawField(object, start_offset), in VisitFixedArrayIncremental() [all …]
|
D | scavenger.cc | 104 static void RecordCopiedObject(Heap* heap, HeapObject* obj) { in RecordCopiedObject() argument 111 if (heap->new_space()->Contains(obj)) { in RecordCopiedObject() 112 heap->new_space()->RecordAllocation(obj); in RecordCopiedObject() 114 heap->new_space()->RecordPromotion(obj); in RecordCopiedObject() 122 INLINE(static void MigrateObject(Heap* heap, HeapObject* source, in INLINE() argument 127 DCHECK(!heap->InToSpace(target) || in INLINE() 128 target->address() + size == heap->new_space()->top() || in INLINE() 129 target->address() + size + kPointerSize == heap->new_space()->top()); in INLINE() 133 DCHECK(!heap->InToSpace(target) || in INLINE() 134 heap->promotion_queue()->IsBelowPromotionQueue( in INLINE() [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 …]
|
/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/v8/src/extensions/ |
D | statistics-extension.cc | 63 Heap* heap = isolate->heap(); in GetCounters() local 70 heap->CollectAllGarbage(Heap::kNoGCFlags, in GetCounters() 120 {heap->memory_allocator()->Size(), "total_committed_bytes"}, in GetCounters() 121 {heap->new_space()->Size(), "new_space_live_bytes"}, in GetCounters() 122 {heap->new_space()->Available(), "new_space_available_bytes"}, in GetCounters() 123 {heap->new_space()->CommittedMemory(), "new_space_commited_bytes"}, in GetCounters() 124 {heap->old_space()->Size(), "old_space_live_bytes"}, in GetCounters() 125 {heap->old_space()->Available(), "old_space_available_bytes"}, in GetCounters() 126 {heap->old_space()->CommittedMemory(), "old_space_commited_bytes"}, in GetCounters() 127 {heap->code_space()->Size(), "code_space_live_bytes"}, in GetCounters() [all …]
|
/external/v8/src/runtime/ |
D | runtime-test.cc | 82 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 87 if (!function->IsOptimized()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 92 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 97 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 110 if (function.is_null()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 113 if (!function->IsOptimized()) return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 118 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 123 return isolate->heap()->undefined_value(); in RUNTIME_FUNCTION() 131 return isolate->heap()->true_value(); in RUNTIME_FUNCTION() 133 return isolate->heap()->false_value(); in RUNTIME_FUNCTION() [all …]
|
/external/v8/src/snapshot/ |
D | natives-common.cc | 15 FixedArray* NativesCollection<CORE>::GetSourceCache(Heap* heap) { in GetSourceCache() argument 16 return heap->natives_source_cache(); in GetSourceCache() 21 FixedArray* NativesCollection<EXPERIMENTAL>::GetSourceCache(Heap* heap) { in GetSourceCache() argument 22 return heap->experimental_natives_source_cache(); in GetSourceCache() 27 FixedArray* NativesCollection<EXTRAS>::GetSourceCache(Heap* heap) { in GetSourceCache() argument 28 return heap->extra_natives_source_cache(); in GetSourceCache() 33 FixedArray* NativesCollection<EXPERIMENTAL_EXTRAS>::GetSourceCache(Heap* heap) { in GetSourceCache() argument 34 return heap->experimental_extra_natives_source_cache(); in GetSourceCache()
|
/external/v8/src/profiler/ |
D | heap-profiler.cc | 17 HeapProfiler::HeapProfiler(Heap* heap) in HeapProfiler() argument 18 : ids_(new HeapObjectsMap(heap)), in HeapProfiler() 19 names_(new StringsStorage(heap)), in HeapProfiler() 37 names_.reset(new StringsStorage(heap())); in DeleteAllSnapshots() 83 HeapSnapshotGenerator generator(result, control, resolver, heap()); in TakeSnapshot() 94 heap()->isolate()->debug()->feature_tracker()->Track( in TakeSnapshot() 107 heap(), names_.get(), sample_interval, stack_depth, flags)); in StartSamplingHeapProfiler() 132 heap()->DisableInlineAllocation(); in StartHeapObjectsTracking() 133 heap()->isolate()->debug()->feature_tracker()->Track( in StartHeapObjectsTracking() 149 heap()->EnableInlineAllocation(); in StopHeapObjectsTracking() [all …]
|