Re: D3DXCreateTexture returns E_OUTOFMEMORY
- From: "Geoffrey Summerhayes" <sumrnot@xxxxxxxxx>
- Date: 1 Mar 2007 08:52:44 -0800
On Mar 1, 6:07 am, john <j...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
D3DXCreateTexture returns E_OUTOFMEMORY .
I run my program.
it consumes 700Mb system memory,when loading.
I calculated this using windows task manager [ctrl+alt+del].
total system mem is 1 Gyga Bytes.
so after loading my program,
almost 1 GBytes used, and very few available memory.
my program runs for a while.
and D3DXCreateTexture returns E_OUTOFMEMORY.
so I retried using
// until D3DXCreateTexture returns ok ..
call .. D3DXCreateTexture
but .. it never returns ok.
It won't. Once you fill a glass with water it
doesn't matter how much more you pour, the only
way to get more water in is to take some out.
so I can't create texture anymore.
of course, I just put another 1G memory card
the problem will be solved (70% ? possibility)
Unlikely. A 32-bit program gets 2GB user +
2GB system as its virtual environment. The
OS keeps track of how that maps to physical
memory and disk.
I want to know
why D3DXCreateTexture fails often ?
even when more memory can be allocated using virtual memory .
that is .. page file swaping ..
Ten to one you have a memory leak, the program
has allocated, used, and finished with a chunk
of memory, but failed to release it. Even if
it's just 4 bytes in one function call, the more
the function is called, the faster the program will
use up all the available memory.
- Prev by Date: Re: Dec2006 SDK has dropped support for ps_1_x ?!?!
- Next by Date: Nvidia 8800 on Vista
- Previous by thread: how do I check for a ray intersecting my terrain
- Next by thread: Re: D3DXCreateTexture returns E_OUTOFMEMORY