Memory Leak?

jinif

Chieftain
Joined
Jan 25, 2002
Messages
89
Location
Davis, CA
I had a little trouble understanding this concept and any posible solutions. When running the game I have had a couple CTD on larger maps (the Earth map) with my computer saying afterwards there was a virtual memory problem.
Is this something I can fix? I have 512 RAM, will getting more solve the problem?
As I understand it the game may be suffering from a memory leak in which the game does not released unused memory, which eventually causes the game to crash.
Once the game crashes, should I restart the computer to get the memory back? or is it released when Civ4 crashes?
Thanks
 
Well, from my programming knowledge, as soon as Civ4.exe or whatever shuts down, all the memory allocated to it should be released, or so the operating system is designed to do.

Of course, there could be issues on whether that actually happens, someone whos know more about the inner workings should be able to confirm.
 
There is no memory leak, as far as I can see. The game runs an entire day on my 256K RAM. However, there seems to be something else: each time you use a new feature, like an advisor screen, it gets loaded into memory and then stays there. So the more features you use during a session, the more memory is claimed by them. If you quit and reload the game the memory will be clear again.
 
Virtual memory is completely different than the concept of "I have X memory, will more help?"

Virtual memory is disk space, not memory. Do disk maintenance (defrag, cleanup, etc.) Then, check out your virtual memory settings (google it).

This may or may not help. But if you are getting a "virtual memory" message, this has nothing to do with your actual memory.
 
I'm pretty sure there is a huge memory leak problem when you load a saved game
 
Crashing without a single warning usually means stack overflow. But this can easily happen with 1.5Gb memory usage even without actual stack error. It can happen just because of 2Gb addressable user memory limit (some of which is reserved for system DLLs, memory-mapped files, etc...). I mean, it does not only grow outside physical memory, it grows outside 32bit address space. Wow! If it's not a memory leak, prepare for complete 64-bit upgrade (including OS).
 
gh0st said:
Virtual memory is disk space, not memory. Do disk maintenance (defrag, cleanup, etc.) Then, check out your virtual memory settings (google it).

oh god. If you don't know what virtual memory is please don't post nonsense like that. :rolleyes:

I think you people should stop trying to prove that there is a memory leak by throwing around random terms without knowing what they mean or how they should be interpreted.

If only half of the memory leak claims on this forum where true then the game wouldn't be able to run for more than 5 seconds!

And yes, I study computer science in the 7th semester and no, I won't go explaining all the terms to you.
 
This can be a memory leak not with each frame, but with some rare, still continous event. Like new turn or entering advisor screen or auto-saving.
 
Hmmm I have no clue so I will just report what happened and let you geniuses figure it out . The game slowed down to a crawl with it taking almost 10 minutes a turn in the most annoying and frustrating ways . It started with a diplmomacy screen ..the music started the screen froze ..and I waited....and waited...nice music...drums are cool...still waiting....waiting...any day now....there we go...done ...oops onother screen technology this time ...ok....waiting....waiting....I'll be back got a house to build .....wow still loading ....next time I'll try a 3 story house...waiting...ok here we go...try to move units...hmmm cant really scroll...WTH ....screw this save ..exit ti desk top ..check task manager...page file history shows ...hmmm 2.4 gigs being used...why wont msn load ?...check processes...CIV IV STILL SHOWING as a running process....end programm.....blinking on and off...never seen that before....still running according to WTM...WTH.......hmmm here we go took a few minutes but it finally died .....I dont know what memory leak is but WTH...this game is screwed .
 
That's actually what memory leak is. Program asks for memory, does something with it, but does not return it back when it's finished. And then it eventually asks for more...

It's like forgetting a pen on the floor instead of putting it back into a pen-box. Sooner or later you'll run out of pens (out of free memory).
 
Good analogy there Harkonnen. And for those of you saying that hardware is the issue, please shutup :) As someone said above they ran it for a whole day on 256mb of RAM. I've got 1Gb of dual channel DDR400 and it just crashed again. So I would say they have something fishy with the whole memory allocation thing in the game.

DaEezt, please don't patronise people just because you're doing computer science. You're not better than the rest of us you just happen to know more. If you're so intelligent then tell us what a memory leak is instead of just saying
"If only half of the memory leak claims on this forum where true then the game wouldn't be able to run for more than 5 seconds!

And yes, I study computer science in the 7th semester and no, I won't go explaining all the terms to you."


You don't actually help the situation with comments like that, you aggravate it. There is supposedly a patch on its way shortly so hopefully this will solve some serious issues the game seems to have such as the diplomacy issue. Hell I just clicked "Ghenghis Khan" to see if i could grab some tech off him and my entire computer reset itself!?! So maybe it'll all get fixed shortly :)
 
Tsume said:
You don't actually help the situation with comments like that, you aggravate it.

Actually I think people who post things that are completly and utterly wrong (like "Virtual memory is disk space, not memory.") aggrevate the situation because people who don't know whats going on believe it and suddently you have half a dozent memory leak threads where everyone blindly joins the crusade started by a few ppl who posted a few technical terms without knowing what they mean. And I didn't patronize anyone, I pointed out some wrong info and I won't argue any points about who is qualified to draw conclusions or who isn't because online, everyone suddently turns into an expert for everything... so you can either believe me or not.

And I still won't preach the inner workings of PCs here, I gave up doing that online quite a while ago.
But Harkonnen seems like he is still enthusiastic enough to explain some of the stuff in detail ;) (And he seems to know that he is talking about)

Just remember: memory leaks don't cause slowdowns and having more main memory doesn't really help either (at least on the average windows system).
 
Ten years ago memory leaks were a common issue, but not now. Crashes are now most likely caused by calling or timing errors although initialization, range, overflow and similar errors are still possible.

Slowdown can be caused by changes in threads, if it's a programming issue, but of course also by the simple fact that the CPU and/or the video chip has more calculations to make as the game progresses.
 
Ribannah said:
Ten years ago memory leaks were a common issue, but not now. Crashes are now most likely caused by calling or timing errors although initialization, range, overflow and similar errors are still possible.

Slowdown can be caused by changes in threads, if it's a programming issue, but of course also by the simple fact that the CPU and/or the video chip has more calculations to make as the game progresses.

Again I do not know why it slows down , but experiance and common sense tells me that the more its got to do , the more it may slow down.. BUT what leads me to a programming problem is the fact that the slowdown is not consistant and seems to be cumulative . Also the ammount and type of problems running the game are ridiculouse ..I compare the game to others I run with the same equipment ..that meets or exceeds the reccomendend hardware and the game still runs like a hemmariodal geezer on morphine..sorry the softwares got some seriouse issues that need to be fixed .
Whatever the problems called be it memory leak or galactic flux ..I care not..I want what I paid for . As it stands now I got a beta testers leftovers .
 
BTW, when I watched it from TaskInfo (more detailed app than task manager) - I saw 6-8 threads spawning and dying evey second. Perhaps these were python garbage collectors, I dunno...

Looking at python folder I see that it uses OpenGL and uses it via Python... hic!
 
DaEezT said:
Actually I think people who post things that are completly and utterly wrong (like "Virtual memory is disk space, not memory.") aggrevate the situation because people who don't know whats going on believe it and suddently you have half a dozent memory leak threads where everyone blindly joins the crusade started by a few ppl who posted a few technical terms without knowing what they mean. And I didn't patronize anyone, I pointed out some wrong info and I won't argue any points about who is qualified to draw conclusions or who isn't because online, everyone suddently turns into an expert for everything... so you can either believe me or not.

And I still won't preach the inner workings of PCs here, I gave up doing that online quite a while ago.
But Harkonnen seems like he is still enthusiastic enough to explain some of the stuff in detail ;) (And he seems to know that he is talking about)

Just remember: memory leaks don't cause slowdowns and having more main memory doesn't really help either (at least on the average windows system).

I meant that you could stop the pointless crusading on memory leaks because I for one AM interested to find out what it is. Ribannah thankyou, that explains a little bit more about what could be happening ^_^ But yeah how the hell does my computer reset itself when I click to see the mongols. I guess that's for another thread ;)
 
DaEezT said:
Actually I think people who post things that are completly and utterly wrong (like "Virtual memory is disk space, not memory.")
Actually, that statement was completely and utterly correct. The virtual memory in Windows is contained in the so-called page file, which is stored on the hard disk, so yes, virtual memory is disk space.
And I didn't patronize anyone, I pointed out some wrong info
...without ever explaining why it is supposedly wrong.
because online, everyone suddently turns into an expert for everything...
It sure seems like it. :rolleyes:
Just remember: memory leaks don't cause slowdowns
Yes, they do.
and having more main memory doesn't really help either (at least on the average windows system).
Yes, it does.
And yes, I study computer science in the 7th semester and no, I won't go explaining all the terms to you.
I hold an MSc degree in computer science and I am project manager in software development, and no, I won't go explaining all the terms to you.

:rolleyes:
 
Ribannah said:
Slowdown can be caused by changes in threads, if it's a programming issue, but of course also by the simple fact that the CPU and/or the video chip has more calculations to make as the game progresses.
From reading the various threads where people complain about slowdowns and from my own experience with the game, the slowdowns in Civ4 are caused mostly by extensive harddrive accesses.
 
Look, there's definately a major memory leak:
 

Attachments

  • memleak1.GIF
    memleak1.GIF
    23.6 KB · Views: 6,389
Back
Top Bottom