Garry's Mod

Garry's Mod

58 ratings
How to fix Gmod LUA PANIC Not enough memory
By Garje
Have you not been able to play gmod because of it crashing everytime you finish loading onto a server ? well i found a fix thats really simple and anyone can do at any time aslong as you have access to the computer that gmod is crashing on.
   
Award
Favorite
Favorited
Unfavorite
Step .1
Firstly go into steam and find Gmod in your library then right click on gmod and click properties.


Step .2
After going into properties click SET LAUNCH OPTIONS...



Step .3
now there should be a box that you can type into on your screen,
to fix the LUA problem you need to type in one of the following corresponding you your ram.







If you have 2GB of ram type in

-heapsize 2097152

If you have 4GB of ram type in

-heapsize 4194304

if you have 8GB of ram type in

-heapsize 8388608

After typing in the command, launch Gmod and load onto a server, if this didn't work and you still crash,
Try typing in the lower amount of ram, for example

if you have 8GB you would type in the one for 4GB

and if you have 4 you would type in for the one with 2GB

but i couldn't find the command for 2 gb of ram, if you do only have 2GB of ram i recommend upgrading to at least 4 or 8, i would say 8 is the perfect amount for gaming. if this doesn't work try to only run gmod on your pc not google chrome or any other apps
< >
111 Comments
elitezrule2 Sep 30 @ 7:08pm 
bruh when people cant pass 2nd grade
funi krout Aug 21 @ 2:33am 
IF YOU HAVE 12 GB JUST MULTIPLY THE 4GB VALUE BY 3 IT'S BASIC MATH WHAT THE FUCK
gunslingerpro2009 Aug 17 @ 12:54am 
dude this error keeps giving me the blue screen of death
soldier gaming Aug 5 @ 11:08pm 
What about 12?
phoenixpnr Jun 23 @ 8:06am 
what about 12 GB
Shankie MacDonald Feb 26 @ 4:39pm 
autism hurts
ArtiusTheFox Feb 5 @ 4:40am 
Correction: It's 1024 x (the amount of GBs you want to allocate) then add 3 0's onto it. (At least I'm pretty sure.)
So here are the amounts:
1GB = 1024000
2GB = 2048000
4GB = 4096000
8GB = 8192000
16GB = 16384000
32GB = 32768000
64GB = 65536000
Don't allocate ALL of your Ram to the game as your system needs some Ram to use outside of the game. For example, if you have 16GBs of Ram total you should probably only allocate 8GBs to the game.
I don't know what i'm doing Sep 28, 2020 @ 6:46pm 
i got 15 gigs of ram what do i do?
martianinferno98 Jun 9, 2020 @ 10:30am 
I only get this error just by loading in a model for the first time
Sapphiresoul73 May 4, 2020 @ 5:51pm 
I have 16 gigs so idk wtf is going on lol