You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,18 @@ Fully resets all global variables of the VM, might be useful for VM reuse betwee
91
91
-**Parameters**
92
92
Doesn't take parameters, returns undefined
93
93
94
+
### `setGas(config)`
95
+
96
+
Updates the gas configuration for the Duktape execution context associated with the current instance.
97
+
98
+
This function sets new limits and costs associated with the Duktape context's resource consumption, commonly referred to as "gas" in the context of execution constraints and sandboxing.
99
+
100
+
-**Parameters**
101
+
-`config`_(Object)_: An object containing the new gas configuration parameters.
102
+
-`gasLimit`_(number)_: The maximum amount of gas that can be consumed. Often represents the upper limit of computational steps or memory usage.
103
+
-`memoryByteCost`_(number)_: The cost per byte of memory used by the Duktape context, contributing to the total gas consumed.
104
+
-`gasUsed`_(number)_: The amount of gas already consumed. This can be set to initialize or reset the consumption counter.
105
+
94
106
## Building
95
107
96
108
You can build Glomium from source by executing following commands:
0 commit comments