benilla-re systems structs docs

Script::GetScriptMemory

function · glue · primitive

Address
0x46da10 · 50 bytes, up to 0x46da41
Signature
int __fastcall (lua_State *L)
Meaning
Returns the scriptMemory CVar in KB divided by 1024, truncated toward zero
Confidence
verified, proof one
Name from
the community database (idb)
Finding
glue/script#script-memory

Finding: Script memory in glue: the script functions

GetScriptMemory (0x46da10) returns the scriptMemory CVar's integer, in KB, divided by 1024 with truncation toward zero, as a number: the default 49152 gives 48. SetScriptMemory (0x46da50) takes a number of MB, else its usage error, and sets the CVar to the decimal text of the low 32 bits of its __ftol, shifted left by 10 with wrap-around. It returns nothing.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.