1# GC 2 3Garbage Collection (GC) is a process that identifies and reclaims memory no longer in use by a program. It aims to free up unused memory space. Modern programming languages implement two primary types of GC algorithms: reference counting and tracing GC. 4 5## GC Algorithm Overview 6 7### Types of GC 8 9#### Reference Counting 10 11When object A is referenced by object B, A's reference count increases by 1. Conversely, when the reference is removed, A's reference count decreases by 1. When A's reference count reaches 0, object A is reclaimed. 12 13- Pros: Reference counting is simple to implement and allows for immediate memory reclamation, avoiding a dedicated Stop The World (STW) phase where the application is paused. 14- Cons: The extra counting step during object manipulation increases the overhead of memory allocation and assignment, affecting performance. More seriously, there is a risk of memory leaks caused by circular references. 15``` 16class Parent { 17 constructor() { 18 this.child = null; 19 } 20 child: Child | null = null; 21} 22 23class Child { 24 constructor() { 25 this.parent = null; 26 } 27 parent: Parent | null = null; 28} 29 30function main() { 31 let parent: Parent = new Parent(); 32 let child: Child = new Child(); 33 parent.child = child; 34 child.parent = parent; 35} 36``` 37In the code above, the **parent** object holds a reference to the **child** object, incrementing the reference count of **parent**. Simultaneously, the **child** object is also held by the **parent** object, incrementing the reference count of **child**. This creates a circular reference, preventing both **parent** and **child** from being released until the **main** function ends, thereby causing a memory leak. 38#### Tracking GC 39 40 41 42Root objects include stack objects and global objects that are guaranteed to be alive at a given moment during program execution. Objects referenced by root objects are also considered alive. By traversing these references, all live objects can be identified. As illustrated in the diagram, starting from the root objects, objects and their fields are traversed. Objects that are reachable are marked in blue, indicating they are live; the remaining unreachable objects are marked in yellow, indicating they are garbage. 43- Pros: Tracing GC solves the circular reference problem and does not incur additional overhead during memory allocation and assignment. 44- Cons: Tracing GC is more complex than reference counting and introduces a brief STW phase. Additionally, GC can be delayed, leading to floating garbage. 45 46Both reference counting and object tracing algorithms have their pros and cons. Given the memory leak issues associated with reference counting, ArkTS Runtime opts for a GC design based on object tracing (tracing GC). 47 48### Types of Tracing GC 49 50Tracing GC algorithms identify garbage by traversing the object graph. Based on the collection method, tracing GC can be categorized into three basic types: mark-sweep, mark-copy, and mark-compact. In the diagrams below, blue indicates live objects, whereas yellow indicates garbage. 51 52#### Mark-Sweep Collection 53 54 55 56After traversing the object graph, the algorithm erases the contents of unreachable objects and places them in a free queue for future allocations. 57 58This approach is highly efficient as it does not move objects. However, since the memory addresses of the reclaimed objects are not contiguous, it can lead to memory fragmentation, which in turn reduces allocation efficiency. In extreme cases, even with a large amount of free memory, it may not be possible to allocate space for larger objects. 59 60#### Mark-Copy Collection 61 62 63 64During the traversal of the object graph, reachable objects are copied to a new memory space. Once the traversal is complete, the old memory space is reclaimed in one go. 65 66This approach eliminates memory fragmentation and completes the GC process in a single traversal, making it efficient. However, it requires reserving half of the memory space to ensure all live objects can be copied, resulting in lower space utilization. 67 68#### Mark-Compact Collection 69 70 71 72After the traversal, live objects (blue) are copied to the beginning of the current space (or a designated area), and the copied objects are reclaimed and placed in the free list. 73 74This approach addresses memory fragmentation without wasting half of the memory space, though it incurs higher performance overhead when compared with mark-copy collection. 75 76### HPP GC 77 78High Performance Partial Garbage Collection (HPP GC) is designed for high performance in partial GC, leveraging generational models, hybrid algorithms, and optimized GC processes. In terms of algorithms, HPP GC uses different collection approaches based on different object regions. 79 80#### Generational Model 81 82ArkTS Runtime uses a traditional generational model, categorizing objects based on their lifetimes. Given that most newly allocated objects are short-lived and collected during the first GC cycle, whereas objects surviving multiple GC cycles are likely to remain alive, ArkTS Runtime divides objects into young and old generations, allocating them to separate spaces. 83 84 85 86Newly allocated objects are placed in the **from** space of Young Space. After surviving one GC cycle, they are moved to the **to** space. Objects that survive another GC cycle are then moved to Old Space. 87 88#### Hybrid Algorithm 89 90HPP GC employs a hybrid algorithm combining mark-copy, mark-compact, and mark-sweep, tailored to the characteristics of young and old generation objects. 91 92- Mark-copy for young generation 93Given the short lifetimes, small size, and frequent collection of young generation objects, ArkTS Runtime uses the mark-copy algorithm to efficiently reclaim memory for these objects. 94- Mark-compact + mark-sweep for old generation 95Based on the characteristics of old generation objects, a heuristic collection set (CSet) algorithm is used. The fundamental idea behind this algorithm is to collect the sizes of live objects in each region during the marking phase. During the collection phase, ArkTS Runtime uses mark-compact for regions with fewer live objects and lower collection costs, but mark-sweep for the remaining regions. 96 97The collection policies are as follows: 98 99- Identifies regions with live object sizes below a threshold, places them in the initial CSet, and sorts them by liveness (survival rate = live object size/region size). 100 101- Selects a final CSet based on a predefined number of regions for compaction. 102 103- Sweeps the remaining regions. 104 105This heuristic approach combines the benefits of mark-compact and mark-sweep algorithms, addressing memory fragmentation while maintaining performance. 106 107#### Process Optimization 108 109HPP GC introduces extensive concurrency and parallelism optimizations to minimize the impact on application performance. The GC process includes concurrent and parallel marking, sweeping, evacuation, updating, and clearing tasks. 110 111## Heap Structure and Parameters 112 113### Heap Structure 114 115 116 117- Semi Space: space for storing young generation, that is, newly created objects with low survival rates. The copying algorithm is used to reclaim memory. 118- Old Space: space for storing old generation, that is, objects that survive multiple GC cycles. Multiple algorithms are used for memory reclamation. 119- Huge Object Space: dedicated regions for storing large objects. 120- Read Only Space: space for storing read-only data at runtime. 121- Non-Movable Space: space for storing non-movable objects. 122- Snapshot Space: space for storing heap snapshots. 123- Machine Code Space: space for storing machine codes. 124 125Each space is managed in regions, which are the units requested from the memory allocator. 126 127### Parameters 128 129> **NOTE** 130> 131> Parameters not marked as configurable are system-defined and cannot be adjusted by developers. 132 133Based on the total heap size ranges (64 MB to 128 MB, 128 MB to 256 MB, or greater than 256 MB), the system sets different sizes for the following parameters. If a parameter has a single value in the range, it remains constant regardless of the total heap size. The default total heap size for mobile phones is greater than 256 MB. 134 135You can use related APIs to query memory information by referring to [HiDebug API Reference](../reference/apis-performance-analysis-kit/js-apis-hidebug.md). 136 137#### Heap Size Parameters 138 139| Name| Value or Value Range| Description| 140| --- | --- | --- | 141| HeapSize | 448 MB| Default total heap size for the main thread. The value is adjusted for low-memory devices based on the actual memory pool size.| 142| SemiSpaceSize | 2–4 MB/2–8 MB/2–16 MB| Size of Semi Space.| 143| NonmovableSpaceSize | 2 MB/6 MB/64 MB | Size of Non-Movable Space.| 144| SnapshotSpaceSize | 512 KB| Size of Snapshot Space.| 145| MachineCodeSpaceSize | 2 MB| Size of Machine Code Space.| 146 147#### Worker Thread Heap Limit 148 149| Name| Value| Description| 150| --- | --- | --- | 151| HeapSize | 768 MB | Heap size for worker threads.| 152 153#### Parameters of Semi Space 154The heap contains two Semi Spaces for copying. 155| Name| Value or Value Range| Description| 156| --- | --- | --- | 157| semiSpaceSize | 2–4 MB/2–8 MB/2–16 MB| Size of Semi Space. The value varies according to the total heap size.| 158| semiSpaceTriggerConcurrentMark | 1 M/1.5 M/1.5 M| Threshold for independently triggering concurrent marking in Semi Space for the first time.| 159| semiSpaceStepOvershootSize| 2 MB | Maximum overshoot size of Semi Space.| 160 161#### Parameters of Old Space and Huge Object Space 162Both spaces are initialized to the remaining unallocated heap size. By default, the upper limit of OldSpaceSize of the main thread on mobile phones approaches 350 MB. 163 164| Name| Value or Value Range| Description| 165| --- | --- | --- | 166| oldSpaceOvershootSize | 4 MB/8 MB/8 MB | Maximum overshoot size of Old Space.| 167 168#### Parameters of Other Spaces 169 170| Name| Value or Value Range| Description| 171| --- | --- | --- | 172| defaultReadOnlySpaceSize | 256 KB | Default size of Read Only Space.| 173| defaultNonMovableSpaceSize | 2 MB/6 MB/64 MB | Default size of Non-Movable Space.| 174| defaultSnapshotSpaceSize | 512 KB/512 KB/ 4 MB | Default size of Snapshot Space.| 175| defaultMachineCodeSpaceSize | 2 MB/2 MB/8 MB | Default size of Machine Code Space.| 176 177#### Interpreter Stack Size 178 179| Name| Value or Value Range| Description| 180| --- | --- | --- | 181| maxStackSize | 128 KB| Maximum size of the interpreter stack.| 182 183#### Concurrency Parameters 184 185| Name| Value| Description| 186| --- | --- | --- | 187| gcThreadNum | 7 | Number of GC threads. The default value is 7. You can set this parameter using **gc-thread-num**.| 188| MIN_TASKPOOL_THREAD_NUM | 3 | Minimum number of threads in the thread pool.| 189| MAX_TASKPOOL_THREAD_NUM | 7 | Maximum number of threads in the thread pool.| 190 191Note: The thread pool is used to execute concurrent tasks in the GC process. During thread pool initialization, all the three parameters need to be considered. If **gcThreadNum** is negative, the number of threads in the initialized thread pool is half of the number of CPU cores. 192 193#### Other Parameters 194 195| Name| Value| Description| 196| --- | --- | --- | 197| minAllocLimitGrowingStep | 2 M/4 M/8 M| Minimum growth step of **oldSpace**, **heapObject**, and **globalNative** when the heap size is recalculated.| 198| minGrowingStep | 4 M/8 M/16 M| Minimum growth step of **oldSpace**.| 199| longPauseTime | 40 ms| Threshold for identifying long GC pauses, which trigger detailed GC log printing for analysis. It can be set using **gc-long-paused-time**.| 200 201## GC Process 202 203 204 205### Types of HPP GC 206 207#### Young GC 208 209- **When to trigger**: The young GC threshold ranges from 2 MB to 16 MB, and it can be adjusted dynamically based on the allocation speed and survival rate. 210- **Description**: primarily collects newly allocated objects in Semi Space. 211- **Scenario**: foreground 212- **Log keywords**: [ HPP YoungGC ] 213 214#### Old GC 215 216- **When to trigger**: The old GC threshold ranges from 20 MB to 300 MB. Typically, the threshold of the first old GC is about 20 MB, and the threshold for subsequent old GC operations is adjusted based on the survival rate and memory usage. 217- **Description**: compacts and compresses the young generation space and parts of the old generation space while sweeping other spaces. It occurs less frequently than young GC, with a longer duration (approximately 5 ms to 10 ms) due to full marking. 218- **Scenario**: foreground 219- **Log keywords**: [ HPP OldGC ] 220 221#### Full GC 222 223- **When to trigger**: Full GC is not triggered based on the memory threshold. After the application transitions to the background, full GC is triggered if the predicted reclaimable object size exceeds 2 MB. You can also trigger full GC using the DumpHeapSnapshot and AllocationTracker tools or calling native interfaces and ArkTS interfaces. 224- **Description**: fully compacts both young and old generations, maximizing memory reclamation in performance-insensitive scenarios. 225- **Scenario**: background 226- **Log keywords**: [ CompressGC ] 227 228Subsequent Smart GC or IDLE GC selections are made from the above three types of GC. 229 230### Trigger Strategies 231 232#### Space Threshold Triggering 233 234- Functions: **AllocateYoungOrHugeObject**, **AllocateHugeObject**, and other allocation-related functions 235- Restriction parameters: corresponding space thresholds 236- Description: GC is triggered when object allocation reaches the space threshold. 237- Log keywords: **GCReason::ALLOCATION_LIMIT** 238 239#### Native Binding Size Triggering 240 241- Functions: **GlobalNativeSizeLargerThanLimit** 242- Restriction parameters: **globalSpaceNativeLimit** 243- Description: It affects the decision for performing full marking and concurrent marking. 244 245#### Background Switch Triggering 246 247- Functions: **ChangeGCParams** 248- Description: Full GC is triggered after the application switches to the background. 249- Log keywords: **app is inBackground**, **app is not inBackground**, and 250 **GCReason::SWITCH_BACKGROUND** 251 252### Execution Strategies 253 254#### Concurrent Marking 255 256- Function: **TryTriggerConcurrentMarking** 257- Description: attempts to trigger concurrent marking and delegate the task of marking objects to the thread pool to reduce the suspension time of the UI main thread. 258- Log keywords: **fullMarkRequested**, **trigger full mark**, **Trigger the first full mark**, **Trigger full mark**, **Trigger the first semi mark**, and **Trigger semi mark** 259 260#### Adjusting Thresholds Before and After New Space GC 261 262- Function: **AdjustCapacity** 263- Description: adjusts the Semi Space trigger threshold after GC to optimize space structure. 264- Log keywords: There is no direct log. The GC statistics logs show dynamic adjustments to young space thresholds before and after GC. 265 266#### Adjusting Threshold After First Old GC 267 268- Function: **AdjustOldSpaceLimit** 269- Description: adjusts the Old Space threshold based on the minimum growth step and average survival rate. 270- Log keyword: **AdjustOldSpaceLimit** 271 272#### Adjusting Old Space/Global Space Thresholds and Growth Factors After Subsequent Old GCs 273 274- Function: **RecomputeLimits** 275- Description: recalculates and adjusts **newOldSpaceLimit**, **newGlobalSpaceLimit**, **globalSpaceNativeLimit**, and growth factors based on current GC statistics. 276- Log keyword: **RecomputeLimits** 277 278#### CSet Selection Strategies for Partial GC 279 280- Function: **OldSpace::SelectCSet()** 281- Description: selects regions with fewer live objects and lower collection costs for partial GC. 282- Typical Logs 283 - Select CSet failure: number is too few 284 - `Max evacuation size is 6_MB. The CSet Region number` 285 - Select CSet success: number is 286 287## SharedHeap 288 289### Shared Heap Structure 290 291 292 293- Shared Old Space: shared space for storing general shared objects. The young generation and old generation are not distinguished in the shared heap. 294- Shared Huge Object Space: shared space for storing large objects. A separate region is used for each large object. 295- Shared Read Only Space: shared space for storing read-only data at runtime. 296- Shared Non-Movable Space: shared space for storing non-movable objects. 297 298Note: The shared heap is designed for objects shared across threads to improve efficiency and save memory. It does not belong to any single thread and stores objects with shared value. It typically has higher survival rates and does not involve Semi Space. 299 300## Features 301 302### Smart GC 303 304#### Description 305 306In performance-sensitive scenarios, the GC trigger threshold of the thread is temporarily adjusted to the maximum heap size (448 MB for the main thread by default), minimizing GC-triggered frame drops. (Smart GC does not take effect for the Worker thread and TaskPool thread.) However, if a performance-sensitive scenario persists too long and object allocation reaches the maximum heap size, GC is triggered, potentially resulting in longer GC times due to accumulated objects. 307 308#### Performance-Sensitive Scenarios 309 310- Application cold start 311- Application scrolling 312- Page transitions via clicks 313- Jumbo frame 314 315Currently, this feature is managed by the system, and third-party applications do not have APIs to directly call this feature. 316 317Log keyword: **SmartGC** 318 319#### Interaction Process 320 321 322 323Mark performance-sensitive scenarios by tagging the heap upon entry and exit to avoid unnecessary GCs and maintain high performance. 324 325## Log Interpretation 326 327### Enabling Full Logs 328 329By default, detailed GC logs are printed only when GC duration exceeds 40 ms. To enable logs for all GC executions, run commands on the device. 330 331**Example** 332 333```shell 334# Enable full GC logs with parameter 0x905d. Disable full GC logs and revert to the default value (0x105c). 335hdc shell param set persist.ark.properties 0x905d 336# Reboot to apply changes. 337hdc shell reboot 338``` 339 340### Typical Logs 341 342The following logs represent a complete GC execution, with variations based on the type of GC. You can search for the keyword [gc] in the exported log file to view GC-related logs. You can also check for the keyword ArkCompiler to view more comprehensive VM-related logs. 343 344``` 345// Pre-GC object size (region size) -> Post-GC object size (region size), total duration (+concurrentMark duration), GC trigger reason. 346C03F00/ArkCompiler: [gc] [ CompressGC ] 26.1164 (35) -> 7.10049 (10.5) MB, 160.626(+0)ms, Switch to background 347// Various states during GC execution and application name. 348C03F00/ArkCompiler: [gc] IsInBackground: 1; SensitiveStatus: 0; OnStartupEvent: 0; BundleName: com.example.demo; 349// Duration statistics for each GC phase. 350C03F00/ArkCompiler: [gc] /***************** GC Duration statistic: ****************/ 351C03F00/ArkCompiler: [gc] TotalGC: 160.626 ms 352C03F00/ArkCompiler: Initialize: 0.179 ms 353C03F00/ArkCompiler: Mark: 159.204 ms 354C03F00/ArkCompiler: MarkRoots: 6.925 ms 355C03F00/ArkCompiler: ProcessMarkStack: 158.99 ms 356C03F00/ArkCompiler: Sweep: 0.957 ms 357C03F00/ArkCompiler: Finish: 0.277 ms 358// Memory usage statistics after GC. 359C03F00/ArkCompiler: [gc] /****************** GC Memory statistic: *****************/ 360C03F00/ArkCompiler: [gc] AllSpaces used: 7270.9KB committed: 10752KB 361C03F00/ArkCompiler: ActiveSemiSpace used: 0KB committed: 256KB 362C03F00/ArkCompiler: OldSpace used: 4966.9KB committed: 5888KB 363C03F00/ArkCompiler: HugeObjectSpace used: 2304KB committed: 2304KB 364C03F00/ArkCompiler: NonMovableSpace used: 0KB committed: 2304KB 365C03F00/ArkCompiler: MachineCodeSpace used: 0KB committed: 0KB 366C03F00/ArkCompiler: HugeMachineCodeSpace used: 0KB committed: 0KB 367C03F00/ArkCompiler: SnapshotSpace used: 0KB committed: 0KB 368C03F00/ArkCompiler: AppSpawnSpace used: 4736.34KB committed: 4864KB 369C03F00/ArkCompiler: [gc] Anno memory usage size: 45 MB 370C03F00/ArkCompiler: Native memory usage size:2.99652 MB 371C03F00/ArkCompiler: NativeBindingSize: 0.577148KB 372C03F00/ArkCompiler: ArrayBufferNativeSize: 0.0117188KB 373C03F00/ArkCompiler: RegExpByteCodeNativeSize:0.280273KB 374C03F00/ArkCompiler: ChunkNativeSize: 19096 KB 375C03F00/ArkCompiler: [gc] Heap alive rate: 0.202871 376// Summary statistics for this type of GC in the VM. 377C03F00/ArkCompiler: [gc] /***************** GC summary statistic: *****************/ 378C03F00/ArkCompiler: [gc] CompressGC occurs count 6 379C03F00/ArkCompiler: CompressGC max pause: 2672.33 ms 380C03F00/ArkCompiler: CompressGC min pause: 160.626 ms 381C03F00/ArkCompiler: CompressGC average pause:1076.06 ms 382C03F00/ArkCompiler: Heap average alive rate: 0.635325 383``` 384 385- GC type, which can be [HPP YoungGC], [HPP OldGC], [CompressGC], and [SharedGC]. 386- **TotalGC**: total duration. The following lists the duration for each phase, including Initialize, Mark, MarkRoots, ProcessMarkStack, Sweep, and Finish. The actual phases may vary depending on the GC process. 387- **IsInBackground**: specifies whether the application is in the background (**1**) or foreground (**0**). 388- **SensitiveStatus**: specifies whether the application is in a sensitive scenario (**1**) or not (**0**). 389- **OnStartupEvent**: specifies whether the application is in a cold start scenario (**1**) or not (**0**). 390- **used**: actual memory usage of allocated objects. 391- **committed**: actual memory allocated to the heap. Since memory spaces are allocated in regions that are not always fully utilized by objects, **committed** is greater than or equal to **used**. For Huge Space, these values are equal because each object occupies a separate region. 392- **Anno memory usage size**: total memory usage of all heaps in the process, including heap and shared heap. 393- **Native memory usage size**: total native memory usage of the process. 394- **NativeBindingSize**: native memory usage of objects bound to the heap. 395- **ArrayBufferNativeSize**: native memory usage of array buffers requested by the process. 396- **RegExpByteCodeNativeSize**: native memory usage of regular expression bytecode requested by the process. 397- **ChunkNativeSize**: native memory usage of chunks requested by the process. 398- **Heap alive rate**: survival rate of objects in the heap. 399 400## GC Developer Debugging Interfaces 401 402> **NOTE** 403> 404> The following interfaces are for debugging purposes only and are not official SDK interfaces. They should not be used in production applications. 405 406### ArkTools.hintGC() 407 408- Invocation: **ArkTools.hintGC()** 409- Type: ArkTS interface 410- Description: triggers the VM to assess whether a full GC should be executed. Full GC is initiated if the expected memory survival rate is below a threshold. It will not trigger in sensitive scenarios. 411- Use case: developers prompting the system to perform GC. 412- Log keywords: There is no direct log. Only external trigger (**GCReason::TRIGGER_BY_JS**) can be found. 413 414 415Usage example: 416 417```ts 418// Declare the interface first. 419declare class ArkTools { 420 static hintGC(): void; 421} 422 423@Entry 424@Component 425struct Index { 426 @State message: string = 'Hello World'; 427 build() { 428 Row() { 429 Column() { 430 Text(this.message) 431 .fontSize(50) 432 .fontWeight(FontWeight.Bold) 433 Button("Trigger Hint GC").onClick((event: ClickEvent) => { 434 ArkTools.hintGC(); // Call the method directly. 435 }) 436 } 437 .width('100%') 438 } 439 .height('100%') 440} 441} 442``` 443 444## GC FAQs 445 446### GC Stability Issues 447 448Most GC stability issues are caused by two types of exceptions: invalid multithreading operations leading to object exceptions, and memory corruption issues leading to pointer exceptions. These issues typically manifest as address access exceptions in the GC task stack. 449 450To identify GC tasks, look for thread names and methods within the stack. The OS_GC_Thread thread primarily handles GC tasks and PGO-related tasks (collection tasks); keywords like GCTask in the stack can be used to identify GC tasks. When GC tasks report crashes with address exceptions, you should first investigate invalid multithreading and memory corruption issues. 451 452- For details about how to check for invalid multithreading operations, see [ArkCompiler Runtime Detection](https://developer.huawei.com/consumer/en/doc/harmonyos-guides/ide-multi-thread-check). 453- For details about how to detect memory corruption, see [HWASan: Detecting Memory Errors](https://developer.huawei.com/consumer/en/doc/harmonyos-guides/ide-hwasan). 454 455The following examples list only some scenarios. The actual reported address exceptions can vary widely and are not detailed here. 456 457Typical stack information about object exceptions: 458 4590xffff000000000048 is an object exception offset error. 460 461``` text 462Reason:Signal:SIGSEGV(SEGV_MAPERR)@0xffff000000000048 463Fault thread info: 464Tid:6490, Name:OS_GC_Thread 465#00 pc 0000000000507310 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::JSHClass::SizeFromJSHClass(panda::ecmascript::TaggedObject*)+0)(a3d1ba664de66d31faed07d711ee1299) 466#01 pc 0000000000521f94 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::CompressGCMarker::EvacuateObject(unsigned int, panda::ecmascript::TaggedObject*, panda::ecmascript::MarkWord const&, panda::ecmascript::ObjectSlot)+80)(a3d1ba664de66d31faed07d711ee1299) 467#02 pc 0000000000521ee4 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::CompressGCMarker::MarkObject(unsigned int, panda::ecmascript::TaggedObject*, panda::ecmascript::ObjectSlot)+372)(a3d1ba664de66d31faed07d711ee1299) 468#03 pc 0000000000523e40 /system/lib64/platformsdk/libark_jsruntime.so(a3d1ba664de66d31faed07d711ee1299) 469#04 pc 0000000000516d74 /system/lib64/platformsdk/libark_jsruntime.so(a3d1ba664de66d31faed07d711ee1299) 470#05 pc 00000000005206d4 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::CompressGCMarker::ProcessMarkStack(unsigned int)+160)(a3d1ba664de66d31faed07d711ee1299) 471#06 pc 000000000050460c /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::Heap::ParallelGCTask::Run(unsigned int)+228)(a3d1ba664de66d31faed07d711ee1299) 472#07 pc 000000000064f648 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::Runner::Run(unsigned int)+188)(a3d1ba664de66d31faed07d711ee1299) 473#08 pc 000000000064f718 /system/lib64/platformsdk/libark_jsruntime.so(a3d1ba664de66d31faed07d711ee1299) 474#09 pc 00000000001ba6b8 /system/lib/ld-musl-aarch64.so.1(start+236)(8102fa8a64ba5e1e9f2257469d3fb251) 475``` 476Typical stack information about pointer exceptions: 477 4780x000056c2fffc0008 indicates that the pointer is abnormal and the pointer mapping is incorrect. 479 480``` text 481Reason:Signal:SIGSEGV(SEGV_MAPERR)@0x000056c2fffc0008 482Fault thread info: 483Tid:2936, Name:OS_GC_Thread 484#00 pc 00000000004d2ec0 /system/lib64/platformsdk/libark_jsruntime.so(733f61d2f51e825872484cc344970fe5) 485#01 pc 00000000004c6cac /system/lib64/platformsdk/libark_jsruntime.so(733f61d2f51e825872484cc344970fe5) 486#02 pc 00000000004cd180 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::NonMovableMarker::ProcessMarkStack(unsigned int)+256)(733f61d2f51e825872484cc344970fe5) 487#03 pc 000000000049d108 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::ConcurrentMarker::ProcessConcurrentMarkTask(unsigned int)+52)(733f61d2f51e825872484cc344970fe5) 488#04 pc 00000000004b6620 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::Heap::ParallelGCTask::Run(unsigned int)+236)(733f61d2f51e825872484cc344970fe5) 489#05 pc 00000000005d6e60 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::Runner::Run(unsigned int)+168)(733f61d2f51e825872484cc344970fe5) 490#06 pc 00000000005d6f30 /system/lib64/platformsdk/libark_jsruntime.so(733f61d2f51e825872484cc344970fe5) 491#07 pc 00000000001bdb84 /system/lib/ld-musl-aarch64.so.1(start+236)(e65f5c83306cf9c7dd4643794946ab9f) 492``` 493