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:
@@ -1555,6 +1555,21 @@ strhelp = STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT
|
||||
strval = STR_JUST_COMMA
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
var = script.script_max_memory_megabytes
|
||||
type = SLE_UINT32
|
||||
from = SLV_SCRIPT_MEMLIMIT
|
||||
guiflags = SGF_NEWGAME_ONLY
|
||||
def = 1024
|
||||
min = 8
|
||||
max = 8192
|
||||
interval = 8
|
||||
str = STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY
|
||||
strhelp = STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SCRIPT_MAX_MEMORY_VALUE
|
||||
cat = SC_EXPERT
|
||||
|
||||
##
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
|
Reference in New Issue
Block a user