Author Topic: Teh memory leak  (Read 4805 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Okay, it looks as if fs2_open has a serious memory leak problem; generally, I can get away with 3 missions before I CTD.

Info I've gathered, posted all this in Bobb's latest thread:
Quote
I tried another memory tracker (mmreg) and it found nothing wrong.

Quote
There aren't any memory leaks after Freespace 2 closes, but there ARE big increases in the memory it takes up while it's running

Quote
I opened FS2 (debug) in windowed mode, along with the Win2k task manager. Loaded the mission, exited, loaded it again.

What happened with memory usage was that after I closed the mission, it remained the same. When I started the mission, it would go back down (partially, IIRC) to what it was before, then just before it finished loading it would spike back up to about 100 MB more than before.


Does anyone have any additional info/ideas? It's not environment mapping or any of Bobb's recent changes, since people were reporting this right after 3.6 came out.
-C

 

Offline SA22C

  • 26
I'm not sure what's going on, but I only get two missions before my computer runs out of memory.

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
Mine'll die after about 20 minutes... Low ram and all.
Freelance Modeler | Amateur Artist

 
Sound preloading in uncompressed formats?

Dunno, my system is too unstable for serious testing, I'm afraid.

Does it leak the same with retail data?

I'm going on a fishing expidition with ideas here, but someone might get a lightbulb over his head if we brainstorm enough.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Tepa

  • 25
    • http://www.darkwing-squad.com
seems like 07072004 gots big leaks too
havent my self got it thx to 1gig ram+w2k
but friends do get em on XP "run outta virtual memory" crash on to desktop after 2-5mins of playing
earlier 3.6build was much better faster loadin and less crashy,
now gotta wait on mission load ages and while that u get timed out or some else gets it
Ensign forever
DW-Tepanator
I need to fill my inflated EGO can someone lend me a pump.

 

Offline Setekh

  • Jar of Clay
  • 215
    • Hard Light Productions
Welcome to HLP, Tepa :)

:welcome:
- Eddie Kent Woo, Setekh, Steak (of Steaks), AWACS. Seriously, just pick one.
HARD LIGHT PRODUCTIONS, now V3.0. Bringing Modders Together since January 2001.
THE HARD LIGHT ARRAY. Always makes you say wow.

 

Offline wolfdog

  • 26
I don't have that problem....
using win2k wih 1gig of ram

 
I never get memory problems, except with certain campaigns like Casualties of War.
Carpe Diem Poste Crastinus

"When life gives you lemons...
Blind people with them..."

"Yah, dude, penises rock." Turambar

FUKOOOOV!

 

Offline wojta

  • 25
    • http://fsworld.wz.cz
I have tried 3.6 from CVS 8.6 and one got yesterday. The first build crashes after 2-5 missions played. The newer ones builds crash mostly earlier. I'm getting Out of memory error and it seems that it takes over 1GB of memory.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
someone introduced huge memory consumption a long while ago.. any we never traced it down - i need to find a program that will give me a per-module lineup of what's using memory
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kosh

  • A year behind what's funny
  • 210
Here are my figures when I played the mission "Nekhbet":

Using physical: 192 meg
Using pagefile: 306 meg
Using virtual: 560 meg

physical free: 7/382 meg
pagefile free: 445/921 meg
virtual free: 1410/2047 meg


Explosions and flak really slow it down the most. I am using a modified 3.6 build Taylor gave me. He fixed some of the memory leaks, and so it is better now than it was. But it still uses a ton.
"The reason for this is that the original Fortran got so convoluted and extensive (10's of millions of lines of code) that no-one can actually figure out how it works, there's a massive project going on to decode the original Fortran and write a more modern system, but until then, the UK communication network is actually relying heavily on 35 year old Fortran that nobody understands." - Flipside

Brain I/O error
Replace and press any key

 
You've probably thought of this, Kazan, but try SourceForge.  They might have something you can use.

All I can add, sorry.
$quot;Only two things are infinite, the universe and human stupidity.  And I'm not sure about the former.$quot;
 - Albert Einstein

$quot;It is foolish and wrong to mourn the men who died. Rather we should thank God that such men lived.$quot;
- Gen. George Patton Jr.

 

Offline Arc

  • 23
Quote
Originally posted by Kazan
i need to find a program that will give me a per-module lineup of what's using memory

Would this be of any use? http://valgrind.kde.org/index.html It is GPL software, but it's Linux based. Maybe taylor or someone could run it?

I mention it cos of one of the tools:
Quote
Massif is a heap profiler. It performs detailed heap profiling by taking regular snapshots of a program's heap. It produces a graph showing heap usage over time, including information about which parts of the program are responsible for the most memory allocations. The graph is supplemented by a text or HTML file that includes more information for determining where the most memory is being allocated. Massif runs programs about 20x slower than normal.

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
No Idea about coding, but I had the most problems with
texture-load. By mission-loading, and sometimes in-mission (when ships
jump in). Also a big problem are wrong loaded background-files,
because facing them drops the Framerate in the cellar.

Restarting solves that issue in the most cases.
« Last Edit: July 09, 2004, 02:35:05 pm by 1072 »
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
i'm setting something up
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
More possibly-related info: I've been crashing when Wavedata_load_buffer is freed, specifically on the line
Code: [Select]
int actual_size = HeapSize(Heap, HEAP_FLAG, ptr);

It DOES seem to be allocated somewhere, too.
-C

 

Offline Tepa

  • 25
    • http://www.darkwing-squad.com
odd i dont get any framerate issues but now i ran outta 1gig ram
after 3 games missiles went retarded and restart for comp took ages when cleaning ram..
note that was on multiplay.
Ensign forever
DW-Tepanator
I need to fill my inflated EGO can someone lend me a pump.

 

Offline Hippo

  • Darth water-horse
  • 211
  • Grazing.
    • All Hands to War
I don't get any problems with memory... I've only got 320 Mb SD, though i've set aside 2048Mb Virtual...
VBB Survivor -- 387 Posts -- July 3 2001 - April 12 2002
VWBB Survivor -- 100 Posts -- July 10 2002 - July 10 2004

AHTW

 

Offline Tepa

  • 25
    • http://www.darkwing-squad.com
then it seems like multiplay uses hell alot memory.
1gig phys+512virtual and when it goes on virtual
thats when ppl start cry about bad weapons even host gets em
Ensign forever
DW-Tepanator
I need to fill my inflated EGO can someone lend me a pump.

 

Offline vyper

  • 210
  • The Sexy Scotsman
It all slows down the longer I play, and eventually after about three missions (insanely long missions from my archived version of maelstrom I'll admit) it crashes out with an out of memory error.

Boo.
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14