Jump to content

Memory leak


photo

Recommended Posts

Memory leak appears in such conditions:

 

- Use original Unigine files (no changes were made to dll, exe, etc.)

- Delete unigine.cfg

- Start app with empty world (it will start at 1280x720)

- Change resolution to 1024x768

- Memory leak appears after 20-30 seconds waiting

 

Leaking continues until "can't allocate x bytes" error appears. Tested this on 3 different computers.

 

Unigine version from 2010.06.28

Link to comment

OS: Microsoft Windows XP, 32-bit (Service Pack 2)

Video: GeForce GTX 285, drivers version: 258.96

 

I've used the code

#include <array.h>
Unigine::Vector a = new Unigine::Vector();
for(int i=0;i<53000;i++){
a.append(new Unigine::Vector(1000));
}

to fill the memory, because it takes several hours to get allocation error in normal conditions (behaviour and results are the same anyway)

log.html

Link to comment

I always though that memory leaks should be avoided, regardless of resources finiteness..

I usually got allocation failures when Unigine is using about 1.2-1.4GB of memory on my 4GB station, while plenty of memory is still available among with 12GB swap file.

Link to comment

Hello.

Please, you have to free memory sometimes, because the memory it is not an infinite resource.

 

Sorry, but how can I free memory if world script is empty and I did't do any allocations at all?

Code in example only for speeding up application crash. Without this code (world script is empty) one have to wait this error for 3-4 hours, but result the same: application crash due to memory lack!

Link to comment

Hello,

The only way to increase the size of the virtual address space for a process beyond 4 GB is to use 64 bit hardware with a 64 bit version of the operating system and application built for the 64 bit instruction set.

The nub of it is, that no matter how much physical RAM is in the computer, the amount of memory available in the process’ private part of the virtual address space in 32 bit Windows implementations is limited to:

* 2 GB - without the /3GB switch - this is the normal, default maximum private virtual address space.

Try to use 64 bit version OS and 64 bit Unigine builds.

 

P.S: I insert your code sample in my update function:

 

/*
*/
void update() {
while(1) {

	Unigine::Vector a = new Unigine::Vector();
	for(int i=0;i<25000;i++){
		a.append(new Unigine::Vector(1000));
	}

	wait;
}
}

 

At the start point process used 595 MB, after 5 minutes with update() function work process used 1.6 MB (I have 64-bit OS, You have 32-bit OS).

Link to comment

Hi, Extaliones!

 

Memory leak appears in such conditions:

 

- Use original Unigine files (no changes were made to dll, exe, etc.)

- Delete unigine.cfg

- Start app with empty world (it will start at 1280x720)

- Change resolution to 1024x768

- Memory leak appears after 20-30 seconds waiting

 

There is no meaning what code we used for memory filling because in unigine build WITHOT any extensions (we didn't write any symbol of code) when CLEAR world (we didn't write any scripting code) is loaded continuous memory leak can occurs. Code form example only helps to decrease waiting time when your try to catch the bug. Application will crash WITHOUT this code. Without ANY user code.

 

Try to use 64 bit version OS and 64 bit Unigine builds.

It seems to me that trying to eliminate symptoms instead treating for a real illness is not a proper way.

Link to comment

There is no meaning what code we used for memory filling because in unigine build WITHOT any extensions (we didn't write any symbol of code) when CLEAR world (we didn't write any scripting code) is loaded continuous memory leak can occurs. Code form example only helps to decrease waiting time when your try to catch the bug. Application will crash WITHOUT this code. Without ANY user code.

 

We will check this issue, please, stand by.

Link to comment
  • 3 weeks later...
  • 2 weeks later...
×
×
  • Create New...