Original Post
I've been adding the new girl models made with the Bastioni Labs Blender plugin to Caveman 3.0. the skin textures generated are 2048x2048.
I started getting some odd behavior loading skinned meshes - CTD with no error messages. I changed the loading order so it loads static meshes, then skinned meshes, then textures. it gets almost all the way through loading textures , and then i get an E_OUTOFMEMORY.
they are being loaded into memeory pool D3DPOOL_MANAGED, so one copy goes in ram, and one in vidram (if possible).
now here's the thing: this is on the new development rig. i7-6700K gtx1080. 16 gig ram, 4 gig vidram. and is says i'm running out of regular ram, not vidram.
i wrote a couple quick and dirty routines to check free ram.
the first repeatedly mallocs and frees a buffer in i meg incrents in size intil it fals, and then returns the size of the last sucessful allocation - ie Largest contiguous block. this starts at say 750 meg or so after data segment is allocated (almost all game data structures are static AOSs) - and goes right down to zero as loading proceeds.
the second routine tries to allocate 10,000 1 meg buffers at once and returns how many it could. it always says it could allocate all 10 gig.
for the moment i turned off a huge unused astar map, and reduced the terrain chunk cache size from 30 to 20. the new instanced plants add 5 buffers totaling 50,000 instances of data to EACH terrain chunk.
but whats up with this ram thing?
am i hitting some kind of data segment limitation? do i get 16 gig, but it has to be on the heap, and in i gig or smaller chunks?