本文整理汇总了C++中Tuple::marked_p方法的典型用法代码示例。如果您正苦于以下问题:C++ Tuple::marked_p方法的具体用法?C++ Tuple::marked_p怎么用?C++ Tuple::marked_p使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tuple
的用法示例。
在下文中一共展示了Tuple::marked_p方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_collect_mature_marks_young_objects
void test_collect_mature_marks_young_objects() {
ObjectMemory& om = *state->memory();
Tuple* young;
Object* mature;
om.large_object_threshold = sizeof(void *) * 50 * 8 / 32;
young = util_new_object(om);
mature = util_new_object(om,20);
young->field[0] = mature; // dangerous, but ok in tests
unsigned int mark = om.mark();
TS_ASSERT(!young->marked_p(mark));
Root r(roots, young);
om.collect_mature(state, gc_data);
gc_data = NULL;
TS_ASSERT(young->marked_p(mark));
}
示例2: test_collect_mature_marks_young_objects
void test_collect_mature_marks_young_objects() {
ObjectMemory& om = *state->vm()->om;
Tuple* young;
Object* mature;
om.large_object_threshold = 50 * 8 * sizeof(void *) / 32;
young = util_new_object(om);
mature = util_new_object(om,20);
young->field[0] = mature; // dangerous, but ok in tests
Root r(roots, young);
om.collect_mature(*gc_data);
TS_ASSERT_EQUALS(young->marked_p(om.mark()), 0U);
}