File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,16 @@ pub trait ObjectTracerContext<VM: VMBinding>: Clone + Send + 'static {
61
61
62
62
/// Create a temporary `ObjectTracer` and provide access in the scope of `func`.
63
63
///
64
- /// When the `ObjectTracer::trace_object` is called, if the traced object is first visited
65
- /// in this transitive closure, it will be enqueued. After `func` returns, the implememtation
66
- /// will create work packets to continue computing the transitive closure from the newly
67
- /// enqueued objects.
64
+ /// A typical use-case of this method is to call `ObjectTracer::trace_object` in a loop for
65
+ /// finalization candidates to create `ProcessEdgesWork` packets.
66
+ //// **Note**: Do not use this API in such a way that only one object is enqueued at a time.
67
+ /// This can result in creating a work packet for a single object, exhausting (physical) memory
68
+ /// if there are enough finalization candidates.
69
+ ///
70
+ /// When the `ObjectTracer::trace_object` is called, if the traced object is visited in this
71
+ /// transitive closure for the first time, it will be enqueued. After `func` returns, the
72
+ /// implementation will create work packets to continue computing the transitive closure from
73
+ /// the newly enqueued objects.
68
74
///
69
75
/// API functions that provide `QueuingTracerFactory` should document
70
76
/// 1. on which fields the user is supposed to call `ObjectTracer::trace_object`, and
You can’t perform that action at this time.
0 commit comments