Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Kazan on July 30, 2004, 02:54:19 pm
-
so I sat there in a debug build - with task manager enabled
Peak Memory usage was ~320MB during mission load - which then dropped to almost nothing (i assume after DX blit'ed the textured from main ram to texture ram) -- FS2's footprint in mission was only about 20 megs in task manager, no indications of any further activity indicating texture loading (infact that spike to ~320 megs was while it was doing texture loading)
stat was reporting a 708MB Footprint
i'd say that's very inaccurate
-
it is simply impossible given the fact that we have only 300 mb of textures.
However: are textured cached while loading?
-
"-stats" is accurate but it's SYSTEM memory rather than APP memory. So it only gives system wide memory usage rather than how memory fs2_open is using. It can be a little more accurate than just taskman since it would be sure to count memory used by external libs but isn't a real indicator of how much memory fs2_open is using. All running apps and Windows itself is included in those numbers. That's why I've said many times that I've never seen memory usage over 350 megs unless it was because of a leak. Now that the memory leak is fixed I'll have no reason to do anything but ignore to 1gig+ memory footprint complaints. :D
Not being all that familiar with DirectX, the little bit of research that I did for the memory problem indicated that D3D will page out textures from memory when the app isn't active or rather has an event change, ie. it gets minimized. You can test this by just going to the mainhall with the game in a window while you can see taskman. When you click on the taskman window fs2_open will minimize and the memory usage will drop. When you restore the game window the memory usage will begin to go back up to it's original levels. That's the long way of saying the the memory doesn't actually drop from that 320 meg, it just gets hidden away somewhere by DirectX.
-
taylor: that's what i figured
no -- it's actually drops from 320 megs -- because it did it while the game was active and running -- that 320 megs was in the BM_LOAD stuff - so it must have dropped when it got swapped out of app ram into D3D's texture system
PS: i'm still getting complains about leakage from the WCS guys
-
Originally posted by Kazan
no -- it's actually drops from 320 megs -- because it did it while the game was active and running -- that 320 megs was in the BM_LOAD stuff - so it must have dropped when it got swapped out of app ram into D3D's texture system
PS: i'm still getting complains about leakage from the WCS guys
Ah, ok. I didn't look at it that close. TGA, JPG and DDS pretty much go right to D3D. PCX and ANI stay in the normal bmp stuff. It's still taking up 320 megs but the memory isn't in fs2 at that point. Misleading but then it's Microsoft were talking about here. ;)
Is WCS showing leaks in OGL too? I didn't see a download on the site so is there something I can test with? If it's in OGL too then I can use Valgrind to find it. If not then I'll have to traipse through the D3D code again.
-
Are they seeing leaks or are they seeing high-memory usage?
-
im not expiriencing memory problems taylor.. so *shrug*
-
Originally posted by taylor
Is WCS showing leaks in OGL too? I didn't see a download on the site so is there something I can test with? If it's in OGL too then I can use Valgrind to find it. If not then I'll have to traipse through the D3D code again.
Open GL simply does not work neither for me nor for any of my staff. At least not as it is supposed to. So... *shrugs*
Also, the latest build produces strange preload problems, as I stated in the other thread.
-
here is what I am talking about
-
Originally posted by Tolwyn
Open GL simply does not work neither for me nor for any of my staff. At least not as it is supposed to. So... *shrugs*
Also, the latest build produces strange preload problems, as I stated in the other thread.
I only use OpenGL unless testing something in D3D so if there is a problem I fix it. Please define "supposed to" a little better so I can get it working the way it should. ;)
I can't remember if you said that it's only the interface graphics that are missing but interface graphics aren't preloaded. They are loaded when you hit that screen. Do you have special graphics other than the standard PCX versions (though ANI and TGA should be supported)? Are they in the data/interface folder? If it were a general error then we'd being hearing about it endlessly so my first guess would be something mod wise or an install issue. If that's not the case though we need to get it fixed.
-
as I said, there is simply no pattern here. Some times it is the mask image, sometimes menu background. Textures and models are not affected (have to test it though)
Additionally, in this case, this are FS2 images that were not found (exit mission screen, which works usually for me).