Vidio and system Memory

Blitz3D Forums/Blitz3D Beginners Area/Vidio and system Memory

YellBellzDotCom(Posted 2007) [#1]
I was trying to see how much memory my game uses by using this code...

	totalmem#=Float(TotalVidMem())/1000000 ;get memory in mb's
	availmem#=Float(AvailVidMem())/1000000
	Text 600,80," Tot Vid: "+Totalmem+"mb, 
	Text 600,100,"Avl Vid: "+availmem+"mb"


This shows 515.995mb, right clicking my computer icon and going to properties shows that I have 768mb of ram. The task manager shows that I am using 18mb of Page file memory and about 50% of cpu usage.

I added some code that copies my model and randomly places it in the scene. I have added 3k copies of my model and the AvailMemory() didnt change, nor did the cpu usage. The Page file memeory increased to around 490mb and the number of tris rendered was around 1.2mill.

My questions are...
I am supposed to have an ATI radeon 1150 integrated with 256mb of hypermemory(Steals from ram)
1024mb of system ram(Could be wrong, 768mb may be correct)

Where is the game getting 515mb of video memory from?
Why is the paging file memory, the only memory affected when adding a bunch of models?(Rendered stuff is stored in VRam, loaded stuff not drawn is stored in system ram?)

thanks for any help, Im going to play with loading a bunch of textures, different sizes, then drawing a bunch of textures, just to see how the memory gets affected.


YellBellzDotCom(Posted 2007) [#2]
Ok, after doing the same thing with loading and drawing images...
The AvailMemory() decreased based on the number of images I added to the scene, the amount of Page File Memory used increased.

Once I ran out of AvailMemory(), it stopped decreasing at .619mb the amount of paging file used increased a lot more and a lot faster.


YellBellzDotCom(Posted 2007) [#3]
I tried again with just loading Images, not drawing them and got the same result as above.


YellBellzDotCom(Posted 2007) [#4]
I used the code to just load textures, this didnt affect any memory at all. I loaded the same texture into an array 6k times and it didnt change any of the memory


MikeP (Dark Mist Software)(Posted 2007) [#5]
"256mb of hypermemory(Steals from ram)"

Thats where its getting 515mb VRAM from, and thats why you lost 256mb of your RAM, because it went to the video card.


YellBellzDotCom(Posted 2007) [#6]
Thanks for the reply,

I figured it was reporting 768mb of ram due to the ATI Driver stealing the other 256mb. I just dont understand why it says 523.026mb total memory and 517.824mb available memory. The ATI 1150M video card goes upto 512mb of Hypermemory, I dont know which one I have on my notebook though. Getting Info from ATI is like pulling teeth. I do know that I have 1gig of system ram installed.

But if my vid card did have 512mb of Hypermemory, wouldnt Blitz say 512mb of total memory? why is it saying an odd number like 523.026mb?


big10p(Posted 2007) [#7]
Well, 1MB is 1024*1024 bytes, for starters.

Plus, the front/back buffers take up some memory. The image you're seeing on your screen right now, where do you think that is stored? :)