• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Is there a way to go past 2 GB Lua memory limit?

zbizu

Legendary OT User
Joined
Nov 22, 2010
Messages
3,323
Solutions
26
Reaction score
2,694
Location
Poland
As in title. I tried to load and compare two OTB files, but the server just crashes at 1.9 GB RAM occupied with out of (Lua?) memory exception.
In normal conditions I don't plan to use that much, but I can imagine it happening. Is there a way to raise that limit? What are the potential downsides?

Environment:
Windows 7, compilation mode 64 bit release, visual studio 19 with sdk .194 and toolset v142
I have at least 5 GB free when server hits its limit so it isn't my PC RAM issue.
 
This seems to be 32bit memory limit.
Try this:

Lua:
function bits() return 1<<32==0 and 32 or 1<<64==0 and 64 end
 
This seems to be 32bit memory limit.
Try this:

Lua:
function bits() return 1<<32==0 and 32 or 1<<64==0 and 64 end
Just a heads up, Lua doesn't have bitwise operators until version 5.3
 
Back
Top