GlobalAlloc fails!
-
I have an application that is getting NULL returned from GlobalAlloc, the error code says "not enough storage avaliable" but that does not make sence. The application has a working set of 450Mb and a virtual set of 790Mb, my machine has 1Gb of physical ram and 2.5Gb total (including virtual memory). This error does not happen on a machine with 2Gb of ram. The request is only for 100Mb. Any ideas why GlobalAlloc should fail? Could it be address space? Are there any compiler/linker flags I can change for MSVC 6?
-
I have an application that is getting NULL returned from GlobalAlloc, the error code says "not enough storage avaliable" but that does not make sence. The application has a working set of 450Mb and a virtual set of 790Mb, my machine has 1Gb of physical ram and 2.5Gb total (including virtual memory). This error does not happen on a machine with 2Gb of ram. The request is only for 100Mb. Any ideas why GlobalAlloc should fail? Could it be address space? Are there any compiler/linker flags I can change for MSVC 6?
Justin Hallet wrote: Any ideas why GlobalAlloc should fail? try calling GetLastError . what are you using for uFlags on the GlobalAlloc call? -c
Image tools: ThumbNailer, Bobber, TIFFAssembler
-
Justin Hallet wrote: Any ideas why GlobalAlloc should fail? try calling GetLastError . what are you using for uFlags on the GlobalAlloc call? -c
Image tools: ThumbNailer, Bobber, TIFFAssembler
I have, GetLastError, returns ERROR_NOT_ENOUGH_MEMORY, "Not enough storage is available to process this command." Call is - GlobalAlloc ( GMEM_MOVEABLE | GMEM_ZEROINIT, aSize ), where size is about, 1048576.
-
I have, GetLastError, returns ERROR_NOT_ENOUGH_MEMORY, "Not enough storage is available to process this command." Call is - GlobalAlloc ( GMEM_MOVEABLE | GMEM_ZEROINIT, aSize ), where size is about, 1048576.
could be you've fragmented the memory so bad that it can't find 100MB of continuous memory. (unlikely). do you do a lot of little allocations elsewhere? -c
Image tools: ThumbNailer, Bobber, TIFFAssembler
-
could be you've fragmented the memory so bad that it can't find 100MB of continuous memory. (unlikely). do you do a lot of little allocations elsewhere? -c
Image tools: ThumbNailer, Bobber, TIFFAssembler
Just a few, actually, I think you may be right here, I think it is fragmentation, I will check the size, I had assumed it was 100Mb, it could be more like 700Mb in which case fragmentation will be the problem.