当前位置: 首页>>代码示例>>C++>>正文


C++ RelocationOverlay类代码示例

本文整理汇总了C++中RelocationOverlay的典型用法代码示例。如果您正苦于以下问题:C++ RelocationOverlay类的具体用法?C++ RelocationOverlay怎么用?C++ RelocationOverlay使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RelocationOverlay类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: traceObject

void
js::Nursery::collectToFixedPoint(MinorCollectionTracer *trc)
{
    for (RelocationOverlay *p = trc->head; p; p = p->next()) {
        JSObject *obj = static_cast<JSObject*>(p->forwardingAddress());
        traceObject(trc, obj);
    }
}
开发者ID:Incognito,项目名称:mozilla-central,代码行数:8,代码来源:Nursery.cpp

示例2: traceObject

void
js::Nursery::collectToFixedPoint(MinorCollectionTracer *trc, TenureCountCache &tenureCounts)
{
    for (RelocationOverlay *p = trc->head; p; p = p->next()) {
        JSObject *obj = static_cast<JSObject*>(p->forwardingAddress());
        traceObject(trc, obj);

        TenureCount &entry = tenureCounts.findEntry(obj->type());
        if (entry.type == obj->type()) {
            entry.count++;
        } else if (!entry.type) {
            entry.type = obj->type();
            entry.count = 1;
        }
    }
}
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:16,代码来源:Nursery.cpp

示例3: getObjectAllocKind

void *
ForkJoinNursery::moveObjectToTospace(JSObject *src)
{
    AllocKind dstKind = getObjectAllocKind(src);
    JSObject *dst = static_cast<JSObject *>(allocateInTospace(dstKind));
    if (!dst)
        CrashAtUnhandlableOOM("Failed to allocate object while moving object.");

    movedSize_ += copyObjectToTospace(dst, src, dstKind);

    RelocationOverlay *overlay = reinterpret_cast<RelocationOverlay *>(src);
    overlay->forwardTo(dst);
    insertIntoFixupList(overlay);

    return static_cast<void *>(dst);
}
开发者ID:rperez08,项目名称:gecko-dev,代码行数:16,代码来源:ForkJoinNursery.cpp

示例4: GetObjectAllocKindForCopy

void *
js::Nursery::moveToTenured(MinorCollectionTracer *trc, JSObject *src)
{
    Zone *zone = src->zone();
    AllocKind dstKind = GetObjectAllocKindForCopy(trc->runtime(), src);
    JSObject *dst = static_cast<JSObject *>(allocateFromTenured(zone, dstKind));
    if (!dst)
        CrashAtUnhandlableOOM("Failed to allocate object while tenuring.");

    trc->tenuredSize += moveObjectToTenured(dst, src, dstKind);

    RelocationOverlay *overlay = reinterpret_cast<RelocationOverlay *>(src);
    overlay->forwardTo(dst);
    trc->insertIntoFixupList(overlay);

    return static_cast<void *>(dst);
}
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:17,代码来源:Nursery.cpp

示例5: traceObject

void
js::Nursery::collectToFixedPoint(MinorCollectionTracer *trc)
{
    for (RelocationOverlay *p = trc->head; p; p = p->next()) {
        JSObject *obj = static_cast<JSObject*>(p->forwardingAddress());
        traceObject(trc, obj);

        /*
         * Increment tenure count and recompile the script for pre-tenuring if
         * long-lived. Attempt to distinguish between tenuring because the
         * object is long lived and tenuring while the nursery is still
         * smaller than the working set size.
         */
        if (isFullyGrown() && !obj->hasLazyType() && obj->type()->hasNewScript() &&
            obj->type()->incrementTenureCount())
        {
            MaybeInvalidateScriptUsedWithNew(trc->runtime, obj->type());
        }
    }
}
开发者ID:jalbertbowden,项目名称:mozilla-central,代码行数:20,代码来源:Nursery.cpp

示例6: traceObject

void
ForkJoinNursery::collectToFixedPoint(ForkJoinNurseryCollectionTracer *trc)
{
    for (RelocationOverlay *p = head_; p; p = p->next())
        traceObject(trc, static_cast<JSObject *>(p->forwardingAddress()));
}
开发者ID:rperez08,项目名称:gecko-dev,代码行数:6,代码来源:ForkJoinNursery.cpp


注:本文中的RelocationOverlay类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。