5.0以前虚拟器GC回收垃圾
2016-11-16 10:12:32 0 举报仅支持查看
AI智能生成
在5.0版本之前,Android系统使用的是基于标记-清除算法的垃圾回收器。该算法分为两个阶段:标记和清除。首先,垃圾回收器会遍历所有的对象,标记出那些不再使用的对象。然后,它会清除所有被标记的对象,释放它们占用的内存空间。这种方式虽然简单高效,但也存在一些问题。例如,它可能会导致应用程序暂停或卡顿,因为它需要停止应用程序的执行来执行垃圾回收操作。此外,由于标记-清除算法无法处理浮动垃圾(即已经删除但仍被其他对象引用的对象),所以它可能会导致内存泄漏问题。为了解决这些问题,Android 5.0引入了新的垃圾回收器,采用了更先进的算法和技术来提高垃圾回收的效率和准确性。
Android GC
模版推荐
作者其他创作
大纲/内容
GcSpec结构体<br>
<span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"> isPartial</span>
<span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"> isConcurrent</span>
<span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"> doPreserve</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"> </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">char</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"> *reason</span>
分配内存成功的函数调用情况<br>
void* dvmHeapSourceAlloc(size_t n) <br>
手动GC或者收到系统GC信号
void dvmCollectGarbage()
涉及到的重要函数讲解
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmSuspendAllThreads(SuspendCause why)</span>
<span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapBeginMarkStep(</span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> isPartial)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> createMarkStack(GcMarkStack *stack)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *dvmHeapSourceGetImmuneLimit(</span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> isPartial)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapMarkRootSet()</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmMarkImmuneObjects(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">char</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *immuneLimit)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmVisitRoots(RootVisitor *visitor, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *arg)</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">visitHashTable(visitor, gDvm.loadedClasses, ROOT_STICKY_CLASS, arg); </span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">visitPrimitiveTypes(visitor, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">visitHashTable(visitor, gDvm.dbgRegistry, ROOT_DEBUGGER, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">visitHashTable(visitor, gDvm.literalStrings, ROOT_INTERNED_STRING, arg); </span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">visitIndirectRefTable(visitor, &gDvm.jniGlobalRefTable, 0, ROOT_JNI_GLOBAL, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">visitReferenceTable(visitor, &gDvm.jniPinRefTable, 0, ROOT_VM_INTERNAL, arg); </span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">visitThreads(visitor, arg);</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> visitThread(RootVisitor *visitor, Thread *</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">thread</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *arg)</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">(*visitor)(&</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">thread</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">->threadObj, threadId, ROOT_THREAD_OBJECT, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">(*visitor)(&</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">thread</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">->exception, threadId, ROOT_NATIVE_STACK, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">visitReferenceTable(visitor, &</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">thread</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">->internalLocalRefTable, threadId, ROOT_NATIVE_STACK, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">visitIndirectRefTable(visitor, &</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">thread</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">->jniLocalRefTable, threadId, ROOT_JNI_LOCAL, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">visitReferenceTable(visitor, &</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">thread</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">->jniMonitorRefTable, threadId, ROOT_JNI_MONITOR, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">visitThreadStack(visitor, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">thread</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">, arg);</span>
static void rootMarkObjectVisitor(void *addr, u4 thread, RootType type, void *arg)
<div>static void markObjectNonNull(const Object *obj, GcMarkContext *ctx, bool checkFinger)</div>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">long</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> setAndReturnMarkBit(GcMarkContext *ctx, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *obj)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> markStackPush(GcMarkStack *stack, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> Object *obj)</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">(*visitor)(&gDvm.outOfMemoryObj, 0, ROOT_VM_INTERNAL, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">(*visitor)(&gDvm.internalErrorObj, 0, ROOT_VM_INTERNAL, arg);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">(*visitor)(&gDvm.noClassDefFoundErrorObj, 0, ROOT_VM_INTERNAL, arg);</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmClearCardTable()</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmResumeAllThreads(SuspendCause why)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapScanMarkedObjects(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">)</span>
<span style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">void</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> dvmHeapBitmapScanWalk(HeapBitmap *bitmap, </span></span><span style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; color: black; background-color: inherit;">BitmapScanCallback *callback, </span><span class="keyword" style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">void</span><span style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; color: black; margin: 0px; padding: 0px; border: none; background-color: inherit;"> *arg)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> scanBitmapCallback(Object *obj, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *finger, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *arg)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> scanObject(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> Object *obj, GcMarkContext *ctx)</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">scanClassObject(obj, ctx);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">scanArrayObject(obj, ctx);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">scanDataObject(obj, ctx); </span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> markObject(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> Object *obj, GcMarkContext *ctx)</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">markObjectNonNull(obj, ctx, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">true</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">);</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">scanFields(obj, ctx);</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> delayReferenceReferent(Object *obj, GcMarkContext *ctx)</span><br>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> processMarkStack(GcMarkContext *ctx)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapReMarkRootSet()</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">dvmVisitRoots(rootReMarkObjectVisitor, ctx); </span>
<ol start="1" class="dp-cpp" style="padding: 0px; border: none; color: rgb(92, 92, 92); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 26px; margin-bottom: 1px !important; margin-right: 0px !important; margin-left: 45px !important;"><li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(108, 226, 108); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; padding-right: 3px !important; padding-left: 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">static</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">void</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> rootReMarkObjectVisitor(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">void</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> *addr, u4 </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">thread</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;">, RootType type, </span></span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">void</span><span style="color: black; margin: 0px; padding: 0px; border: none; background-color: inherit;"> *arg)</span></li></ol>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapReScanMarkedObjects()</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> scanGrayObjects(GcMarkContext *ctx)</span>
<ol start="1" class="dp-cpp" style="padding: 0px; border: none; color: rgb(92, 92, 92); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 26px; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 45px !important;"><li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(108, 226, 108); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; padding-right: 3px !important; padding-left: 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">const</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> u1 *scanDirtyCards(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">const</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> u1 *start, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">const</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> u1 *end, </span></span><span style="color: black; background-color: inherit;">GcMarkContext *ctx) </span></li></ol>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> Object *nextGrayObject(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> u1 *base, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> u1 *limit,</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">const</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);"> HeapBitmap *markBits)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapProcessReferences(Object **softReferences, </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> clearSoftRefs,</span><span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);"> Object **weakReferences,</span><span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">Object **finalizerReferences,</span><span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">Object **phantomReferences)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> preserveSomeSoftReferences(Object **list)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> clearWhiteReferences(Object **list)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> enqueueFinalizerReferences(Object **list)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapSweepSystemWeaks()</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapSourceSwapBitmaps()</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapSweepUnmarkedObjects(</span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> isPartial, </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">bool</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> isConcurrent,</span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">size_t</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);"> *numObjects, </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);">size_t</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px; background-color: rgb(248, 248, 248);"> *numBytes)</span>
<ol start="1" class="dp-cpp" style="padding: 0px; border: none; color: rgb(92, 92, 92); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 26px; margin-right: 0px !important; margin-bottom: 1px !important; margin-left: 45px !important;"><li class="alt" style="border-style: none none none solid; border-left-width: 3px; border-left-color: rgb(108, 226, 108); list-style: decimal-leading-zero outside; color: inherit; line-height: 18px; padding-right: 3px !important; padding-left: 10px !important;"><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">void</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> dvmHeapBitmapSweepWalk(</span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">const</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> HeapBitmap *liveHb, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">const</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> HeapBitmap *markHb,</span></span><span style="margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; background-color: inherit;">uintptr_t</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> base, </span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; background-color: inherit;">uintptr_t</span><span style="margin: 0px; padding: 0px; border: none; background-color: inherit;"> max, </span></span><span style="color: black; background-color: inherit;">BitmapSweepCallback *callback, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; background-color: inherit;">void</span><span style="color: black; margin: 0px; padding: 0px; border: none; background-color: inherit;"> *callbackArg)</span></li></ol>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">static</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> sweepBitmapCallback(</span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">size_t</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> numPtrs, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> **ptrs, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> *arg)</span>
<span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">size_t</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapSourceFreeList(</span><span class="datatypes" style="margin: 0px; padding: 0px; border: none; color: rgb(46, 139, 87); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">size_t</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> numPtrs, </span><span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> **ptrs)</span>
<span class="keyword" style="margin: 0px; padding: 0px; border: none; color: rgb(0, 102, 153); font-weight: bold; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;">void</span><span style="margin: 0px; padding: 0px; border: none; color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; line-height: 18px;"> dvmHeapFinishMarkStep()</span>
GC类型<br>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(248, 248, 248);">GC_FOR_MALLOC</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(255, 255, 255);">GC_CONCURRENT</span>
<span style="color: rgb(0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(248, 248, 248);">GC_EXPLICIT</span>
<strong style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 26px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">GC_BEFORE_OOM</strong>
分配内存失败的函数调用情况<br>
void gcForMalloc(bool clearSoftReferences)
GC线程的启动<br>
static void *gcDaemonThread(void* arg)
Mark-Sweep算法流程图
收藏
立即使用
评论
0 条评论
下一页