Massive memory leak

The worst monsters in the Hearthlands warp the fabric of space and time..

Massive memory leak

Postby Granger » Mon May 10, 2010 2:32 am

While running the original client i just realize it allocates more than 200 KB between each time my taskmanager updates.

Since this happens while standing in a house and doing exactly nothing i suspect a massive memory leak somewhere.

Please fix this.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
Granger
 
Posts: 9264
Joined: Mon Mar 22, 2010 2:00 pm

Re: Massive memory leak

Postby loftar » Mon May 10, 2010 12:25 pm

Granger wrote:While running the original client i just realize it allocates more than 200 KB between each time my taskmanager updates.

Per what metric? Virtual memory often makes it quite hard to tell if such things are real or not, and, if they are, if it's really a problem. Particularly so in GC environments like Java. It could just be the eden gen moving upwards in the address space or the compacting gen thrashing around a bit (those are just conjectures; I don't actually know the details of the memory allocation schemes of the JVM).
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Massive memory leak

Postby Granger » Mon May 10, 2010 2:11 pm

I had the client starting with something about 200MB, after not that long it was way over 1GB (ok, as reported by windows taskmanager - whatever this means).

From my coding experience though i know this (wrote something similar in which forgot to release some objects - which piled up).

I would guess something in the renderloop (given that you have numeric instabilities in it, like the nose of a cow near a fence being drawn infront or back of it on what seems to be random) is allocated on each iteration and not free'ed afterwards... maybe you can profile it some day? It really sucks on machines with low RAM.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
Granger
 
Posts: 9264
Joined: Mon Mar 22, 2010 2:00 pm

Re: Massive memory leak

Postby loftar » Mon May 10, 2010 2:55 pm

The JVM tends to use about as much virtual memory as the size of its heap. I have no clue what the value reported by Windows' task manager really means, though, but you should be aware that even though it uses that much virtual memory, it is often so that comparatively little of it may have been allocated physical pages.

It is a bit weird that it uses quite that much, though, since I've specified in the JNLP file that the heap should only be 256 MB. I wouldn't be surprised if the JVM allocates more anyway if it finds that the system has more VM space available, however.

I cannot even leak any great amount of memory, truth be told. If I were to leak memory, the JVM would run out of heap space and throw an OutOfMemoryException anyway, so you'd notice mercilessly if that were what is happening. :)
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am


Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 1 guest