Re: Memory allocation
- From: "Andrew Jarvis" <someone@somewhere>
- Date: Fri, 14 Sep 2007 10:44:25 +0100
"Kellie Fitton" <KELLIEFITTON@xxxxxxxxx> wrote in message
news:1189706964.308818.42130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Sep 13, 9:00 am, "Andrew Jarvis" <someone@somewhere> wrote:
Dear All,
I have I C++ COM DLL for performing computed tomography which until now
has
been able to allocate memory up to the 2Gb limit with no problems.
Now I am finding that I get an out of memory error if I try to allocate
more
than 250Mb.
GlobalMemoryStatusEx shows 1.7Gb available physical RAM.
I have tried VirtualAlloc, GlobalAlloc and HeapAlloc with the same
result.
A VB6 test program allocates 1439Mb using GlobalAlloc. (VirtualAlloc does
not work at all - I've no idea why)
What could possibly be introducing this limitation?
I have upgraded from VS6 to VS2005 for writing the DLLs but I can't see
how
that could be responsible. The main process is the same VB6 application.
Regards,
Andrew
Hi,
Try to use the following APIs to get some clues on how much actual
memory, the virtual memory manager wants you to use within your
application program:
GetProcessWorkingSetSizeEx()
SetProcessWorkingSetSizeEx()
http://msdn2.microsoft.com/en-us/library/ms683227.aspx
http://msdn2.microsoft.com/en-us/library/ms686237.aspx
Kellie.
When I include a call to GetProcessWorkingSetSizeEx I can no longer load my
DLL because it introduces a dependency to dwmapi.dll. I understand that this
is a Vista DLL that does not exist in Windows XP.
Could this be related to my original problem?
.
- References:
- Memory allocation
- From: Andrew Jarvis
- Memory allocation
- Prev by Date: Detecting Windows XP Professional N
- Next by Date: Re: Desktop Creation
- Previous by thread: Memory allocation
- Next by thread: Re: Memory allocation
- Index(es):
Relevant Pages
|
Loading