Re: D3DXCreateTexture returns E_OUTOFMEMORY



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.

D3DXCreateTexture fails.
so I retried using

while( )
{
// until D3DXCreateTexture returns ok ..
Sleep(200);
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.

---
Geoff

.



Relevant Pages

  • Re: Creating Texture from bytes streams?
    ... For files in memory, use D3DXCreateTextureFromFileInMemory. ... use D3DXCreateTexture then ... D3DXLoadSurfaceFromMemory. ... "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ: ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Generating one table with a terabyte of data
    ... Take any simple string matching issues and run them as external C code on the files before loading. ... not match the job but can be adjusted for greater performance by changing memory type or adjusting IO layouts. ... them after a bulk load. ... Another thing is to split the updates across file sets. ...
    (microsoft.public.sqlserver.dts)
  • Re: sever crash when connecting use remote desktop clients
    ... full memory dump is a little bit ... ... Can u also create a full memory dump and analyze it on the same way? ... Symbol loading may be unreliable without a symbol search path. ... After setting your symbol path, use .reload to refresh symbol locations. ...
    (microsoft.public.windows.server.general)
  • Re: ASUS K8N-E Deluxe ( Deluxe problem)
    ... video, 400Watt PS, yada yada yada ... it's "Loading FAT file system" ... ... I found that by removing one of the 512MB ram sticks, ... The best position for your two memory sticks, is in slot 1 and slot 3. ...
    (alt.comp.periphs.mainboard.asus)
  • Re: ASUS K8N-E Deluxe ( Deluxe problem)
    ... video, 400Watt PS, yada yada yada ... it's "Loading FAT file system" ... ... I found that by removing one of the 512MB ram sticks, ... The best position for your two memory sticks, is in slot 1 and slot 3. ...
    (alt.comp.periphs.mainboard.asus)