Change: Limit memory allocations for each Squirrel instance
This can avoid out-of-memory situations due to single scripts using up the entire address space. Instead, scripts that go above the maximum are killed. The maximum is default 1 GB per script, but can be configured by a setting.
This commit is contained in:
@@ -339,6 +339,7 @@ struct AISettings {
|
||||
struct ScriptSettings {
|
||||
uint8 settings_profile; ///< difficulty profile to set initial settings of scripts, esp. random AIs
|
||||
uint32 script_max_opcode_till_suspend; ///< max opcode calls till scripts will suspend
|
||||
uint32 script_max_memory_megabytes; ///< limit on memory a single script instance may have allocated
|
||||
};
|
||||
|
||||
/** Settings related to the new pathfinder. */
|
||||
|
Reference in New Issue
Block a user