(Apologies if this is in the wrong forum, but I felt this would be better suited to here than the software technical support forum)
So I think I have a memory leak, even in an unmodded Minecraft.
Just sitting on the world selection screen gets me up to 400MB memory usage, and within the first few seconds of gameplay I go over 600MB. Eventually I have to restart as it goes up to above 1GB, just to make sure it doesn't crash. The memory usage doesn't go down until I close the game, even once going back to the title screen.
As it's been suggested to do elsewhere, I've tried different heap sizes (from 256M to 2GB), and even installed JRE 7. Anyone wanna post what they use to start it up? Would I be better off using JRE 6 (what I started with) or 7 (what was suggested would fix it)?
Going to completely remove Java, and then reinstall 6. But I doubt it'll work.
(On another note, this is all on an unmodded .jar. I do normally play with mods, but they don't see mto make any difference aside from mcpatcher, which ends up using RAM much more quickly when I have a texture pack above 16x16 in use.)
you're running the ? os, change to windows
[img]http://gyazo.com/0a19919ebf5d13834ce3bbd782df743c.png[/img]
[I]unmodded?[/I] What is this anarchy?
[QUOTE=Rolond Returns;31589141][img]http://gyazo.com/0a19919ebf5d13834ce3bbd782df743c.png[/img][/QUOTE]
What.
Anyway, I am on Windows 7 x64, forgot to mention that.
Edit: Oh, [I]now[/I] it sees what I'm using.
Download 64bit java
I already had it (reinstalling ONLY that though, in case Minecraft somehow used jre 6 32-bit or something)
Edit: Nope. Went to 670MB in about 20 seconds of gameplay. Still rising.
Edit 2: Okay, so it seems to stick around 680MB until I start walking. Is there any way chunks loading could be doing this? What should the usual amount f RAM usage be?
Edit 3 (ugh): Aha! Setting the render distance to "tiny" keeps it at about 425MB and it isn't climbing too much yet. But it's hard to play on tiny :(
Minecraft usually uses 1.5 GBs of RAM for me.
Mine uses about 1gb. No mods at all.
About half a gig of RAM used on a fresh launch logged into my SMP server.
Well... I haven't fixed it, (I don't think. It still uses more memory than it used to) but after messing with the settings for a while, I've managed to get it to stay around 700MB to 1GB. Basically all that's helped is to use a 16x16 texture pack and not use the "far" render settings. Which is lame, but playable again.
You can limit the amount of memory Minecraft is able to use, and that should stop the memory leak. In fact limiting it to around 200 MB or so has fixed a quite a number of issues for me.
I find that having a pure x64 version of Java installed on my machine keeps memory usage to roughly 500mb, when I've allowed about 1gb for Java to use. Since launch, I've never had Minecraft quit on me due to memory, unless I was attempting to reach the farlands by flying.
*Edit:
This is on my Windows 7 x64 machine with 4Gb of RAM, if anyone's looking at my current OS.
[QUOTE=a-k-t-w;31597612]You can limit the amount of memory Minecraft is able to use, and that should stop the memory leak. In fact limiting it to around 200 MB or so has fixed a quite a number of issues for me.[/QUOTE]
How would I go about limiting the memory Minecraft uses?
[code]
java -Xmx256M -Xms256M -cp Minecraft.exe net.minecraft.LauncherFrame
[/code]
Place that in a batch file in the same directory as Minecraft. Then, run the batch file. Minecraft will then only be limited to 256MB - what it needs.
You could also just embed that into a shortcut. Looks nicer.
Mine uses 400 MB with render on far with a 32x32 texture pack and TMI and Zombes installed. I think that you should probably use OptiFine or whatever that guy calls it.
[QUOTE=ConTron123;31601047][code]
java -Xmx256M -Xms256M -cp Minecraft.exe net.minecraft.LauncherFrame
[/code]
Place that in a batch file in the same directory as Minecraft. Then, run the batch file. Minecraft will then only be limited to 256MB - what it needs.[/QUOTE]
I actually tried that before starting this topic, and it still went up to about 1GB.
Is there any way the Windows Task Manager is reporting the wrong amount... ? Or might the fact that it still went way above 256MB mean something just isn't working?
Edit: Actually, I did the minecraft.jar launcher instead of .exe. Does that matter?
Edit again:
[IMG]http://dl.dropbox.com/u/1177504/Minecraft/1/minecraft.jpg[/IMG]
[IMG]http://dl.dropbox.com/u/1177504/Minecraft/1/ram%20usage.jpg[/IMG]
(I don't know what half the numbers mean so I just sent the whole upper screen) This is with the quoted batch file. Minecraft seems to limit it internally but I'm still getting 300MB minimum as soon as I run the game, and even more as it goes on, in the task manager. It hasn't given me an out-of-memory error in a while, but does this matter?
Perhaps that extra memory use is from java itself.
[QUOTE=Spyduck;31608568]I actually tried that before starting this topic, and it still went up to about 1GB.
Is there any way the Windows Task Manager is reporting the wrong amount... ? Or might the fact that it still went way above 256MB mean something just isn't working?
Edit: Actually, I did the minecraft.jar launcher instead of .exe. Does that matter?
Edit again:
(I don't know what half the numbers mean so I just sent the whole upper screen) This is with the quoted batch file. Minecraft seems to limit it internally but I'm still getting 300MB minimum as soon as I run the game, and even more as it goes on, in the task manager. It hasn't given me an out-of-memory error in a while, but does this matter?[/QUOTE]
The -Xmx parameter sets the maximum HEAPSIZE, which is different than total memory. The heap is the area of memory used for objects and variables created during runtime. More memory will be used by libraries, the JVM, and the actual code that you're running.
That ammount in Task Manager is normal. Mine goes that high too.
[QUOTE=ConTron123;31601047][code]
java -Xmx256M -Xms256M -cp Minecraft.exe net.minecraft.LauncherFrame
[/code]
Place that in a batch file in the same directory as Minecraft. Then, run the batch file. Minecraft will then only be limited to 256MB - what it needs.[/QUOTE]
Wow I can't thank you enough for this.
I haven't played Minecraft for two weeks because of my Minecraft being retarded.
At first, considering my ATI graphics drivers crashed i thought that it was my GPU.
Took me two weeks to check if I was having a memory leak, I'm stupid.
[editline]11th August 2011[/editline]
-NEVERMIND-
what is the exact error you are getting?
Sorry, you need to Log In to post a reply to this thread.