typedef struct {...} JSVM_CreateVMOptions Defines options for creating a JavaScript VM.
Use scenario: Scenarios where an app needs to customize the memory configuration of a JavaScript VM, needs to use the snapshot feature to accelerate VM startup, or has special requirements on VM memory usage in embedded or resource-constrained environments.
System capability: SystemCapability.ArkCompiler.JSVM
Since: 11
Related module: JSVM
Header file: jsvm_types.h
| Name | Description |
|---|---|
| size_t maxOldGenerationSize | Maximum size of the old-generation memory. |
| size_t maxYoungGenerationSize | Maximum size of the young-generation memory. |
| size_t initialOldGenerationSize | Initial size of the old-generation memory. |
| size_t initialYoungGenerationSize | Initial size of the young-generation memory. |
| const char* snapshotBlobData | Startup snapshot data. |
| size_t snapshotBlobSize | Size of the startup snapshot data. |
| bool isForSnapshotting | Whether the VM is used for snapshotting. If the value is true, VM is used for snapshotting. If the value is false, VM is not used for snapshotting. |