Name Description Size
Allocator.cpp = CanGC 25977
Allocator.h 2551
AllocKind.h GC-internal definition of GC cell kinds. 10221
ArenaList-inl.h 8118
ArenaList.h GC-internal definitions of ArenaList and associated heap data structures. 12717
AtomMarking-inl.h 2899
AtomMarking.cpp 10078
AtomMarking.h 3360
Barrier.cpp static 8112
Barrier.h 37324
Cell.h namespace shadow 18326
ClearEdgesTracer.h 1494
DeletePolicy.h Provides a delete policy that can be used for objects which have their lifetime managed by the GC so they can be safely destroyed outside of GC. This is necessary for example when initializing such an object may fail after the initial allocation. The partially-initialized object must be destroyed, but it may not be safe to do so at the current time as the store buffer may contain pointers into it. This policy traces GC pointers in the object and clears them, making sure to trigger barriers while doing so. This will remove any store buffer pointers into the object and make it safe to delete. 1358
FinalizationGroup.cpp Finalization group GC implementation. 3327
FindSCCs.h Find the strongly connected components of a graph using Tarjan's algorithm, and return them in topological order. Nodes derive from GraphNodeBase and add target edge pointers to sourceNode.gcGraphEdges to describe the graph: struct MyGraphNode : public GraphNodeBase<MyGraphNode> { ... } MyGraphNode node1, node2, node3; node1.gcGraphEdges.put(node2); // Error checking elided. node2.gcGraphEdges.put(node3); node3.gcGraphEdges.put(node2); ComponentFinder<MyGraphNode> finder; finder.addNode(node1); finder.addNode(node2); finder.addNode(node3); MyGraphNode* result = finder.getResultsList(); 5069
FreeOp-inl.h 1634
FreeOp.h A JSFreeOp can do one thing: free memory. For convenience, it has delete_ convenience methods that also call destructors. JSFreeOp is passed to finalizers and other sweep-phase hooks so that we do not need to pass a JSContext to those hooks. 6214
GC-inl.h 12643
GC.cpp 277465
GC.h JS engine garbage collector API. 6474
GCEnum.h GC-internal enum definitions. 5291
GCInternals.h GC-internal definitions. 9740
GCLock.h GC-internal classes for acquiring and releasing the GC lock. 3251
GCMarker.h When the mark stack is full, the GC does not call js::TraceChildren to mark the reachable "children" of the thing. Rather the thing is put aside and js::TraceChildren is called later when the mark stack is empty. To implement such delayed marking of the children with minimal overhead for the normal case of sufficient stack, we link arenas into a list using Arena::setNextDelayedMarkingArena(). The head of the list is stored in GCMarker::delayedMarkingList. GCMarker::delayMarkingChildren() adds arenas to the list as necessary while markAllDelayedChildren() pops the arenas from the stack until it is empty. 16298
GCParallelTask.h 6553
GCRuntime.h 42621
GCTrace.cpp This currently does not support multiple runtimes. 6005
GCTrace.h Tracing code is declared within this class, so the class can be a friend of something and access private details used for tracing. 2255
GCTraceFormat.h Each trace is stored as a 64-bit word with the following format: 56 48 0 +----------------+----------------+-----------------------------------------+ | Event type | Optional extra | Optional payload | +----------------+----------------+-----------------------------------------+ 1656 12257
HashUtil.h Used to add entries to a js::HashMap or HashSet where the key depends on a GC thing that may be moved by generational or compacting GC between the call to lookupForAdd() and relookupOrAdd(). 2527
Heap-inl.h 1811
Heap.h This flag allows an allocation site to request a specific heap based upon the estimated lifetime or lifetime requirements of objects allocated from that site. 30685
Marking-inl.h namespace gc 4999
Marking.cpp clang-format off 123338
Marking.h Marking and sweeping APIs for use by implementations of different GC cell kinds. 5633
Memory.cpp System allocation functions generally require the allocation size to be an integer multiple of the page size of the running process. 33364
Memory.h gc_Memory_h 3189 1331
Nursery-inl.h safe - used for value in comparison above 4921
Nursery.cpp 51492
Nursery.h Key Header text 22544
NurseryAwareHashMap.h 6698
ObjectKind-inl.h GC-internal helper functions for getting the AllocKind used to allocate a JSObject and related information. 5688
Policy.h JS Garbage Collector. 3089
PrivateIterators-inl.h GC-internal iterators for various data structures. 4667
PublicIterators.cpp 9558
PublicIterators.h Iterators for various data structures. 5403
RelocationOverlay.h GC-internal definition of relocation overlay used while moving cells. 1864
Rooting.h Interface substitute for Rooted<T> which does not root the variable's memory. 5872
RootMarking.cpp 20928
Scheduling.cpp We may start to collect a zone before its trigger threshold is reached if GCRuntime::maybeGC() is called for that zone or we start collecting other zones. These eager threshold factors are not configurable. 24568
Scheduling.h 33722
Statistics.cpp If this fails, then you can either delete this assertion and allow all larger-numbered reasons to pile up in the last telemetry bucket, or switch to GC_REASON_3 and bump the max value. 51708
Statistics.h Number of zones collected in this GC. 16211
StoreBuffer-inl.h static 2276
StoreBuffer.cpp 5029
StoreBuffer.h BufferableRef represents an abstract reference for use in the generational GC's remembered set. Entries in the store buffer that cannot be represented with the simple pointer-to-a-pointer scheme must derive from this class and use the generic store buffer interface. A single BufferableRef entry in the generic buffer can represent many entries in the remembered set. For example js::OrderedHashTableRef represents all the incoming edges corresponding to keys in an ordered hash table. 16873
Tracer.cpp Callback Tracer Dispatch ********************************************** 11405
Tracer.h 10295
Verifier.cpp Write barrier verification The next few functions are for write barrier verification. The VerifyBarriers function is a shorthand. It checks if a verification phase is currently running. If not, it starts one. Otherwise, it ends the current phase and starts a new one. The user can adjust the frequency of verifications, which causes VerifyBarriers to be a no-op all but one out of N calls. However, if the |always| parameter is true, it starts a new phase no matter what. Pre-Barrier Verifier: When StartVerifyBarriers is called, a snapshot is taken of all objects in the GC heap and saved in an explicit graph data structure. Later, EndVerifyBarriers traverses the heap again. Any pointer values that were in the snapshot and are no longer found must be marked; otherwise an assertion triggers. Note that we must not GC in between starting and finishing a verification phase. 22074
Verifier.h Internal header for definitions shared between the verifier and jsapi tests. 1810
WeakMap-inl.h static 9083
WeakMap.cpp For unmarked weakmap keys with delegates in a different zone, add a zone edge to ensure that the delegate zone finishes marking before the key zone. 5501
WeakMap.h 10205
WeakMapPtr.cpp 3177
Zone-inl.h static 3630
Zone.cpp Ensure that there are no vtables to mess us up here. 26697
Zone.h 23378
ZoneAllocator.h Public header for allocating memory associated with GC things. 9876