Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Out of memory error

Status
Not open for further replies.

Digsy

Programmer
Sep 5, 2002
202
GB
Hello all.

I am working on a very memory intensive (in house) test program. To combat this I have made approx 4.9GB of virtual memory available.

However the program always falls over when it reaches 2GB of memory usage with the out of memory error. Is this because VB6 can only have 2GB allocated to it?

Has anybody else experienced this and if so did you overcome it?

Best regards,

Dave
 
I quote:

"The range of an address space is defined by the native word size of the operating system. For Windows NT based systems, this value has a size of 32 bits, which corresponds to an address space of 2^32 bytes or approximately 4 gigabytes of memory. Thus, all processes on Windows NT platforms are limited to having access to only 4 gigabytes of memory.

This is not the only limitation placed on processes on Windows platforms, though. System addresses are mapped into this address space, so the available address space is further reduced. The amount of address space is utilized by the system is dependent on the version of Windows NT being used. For Windows NT and 2000 Workstation and some versions of Windows NT Server, the upper 2 gigabytes of the address space is reserved for the system. This leaves only 2 gigabytes available to the process for use."

Note that on some of the server platform is it possible to reconfigure memory usage to make available 3GB of memory, but no more, and you cannot do the same thing on workstations.
 
Just discovered that this 2GB limit is due to Windows and not VB. Apparently only 2GB of 'user memory' is allocated to processes running on Windows 2000.

Time to revisit the algorithm and make it more efficient i guess!

Dave
 
Arrrgh. Cross posting.

Thanks for the reply though strongm had just managed to track something down using Google myself. (Note to self, use Google properly before posting questions)

There is apparently a work around according to this but it looks like it may be a little complicated!

Dave
 
My point about extending available memory to 3GB still applies, even with PAE and AWE (the techniques referenced in the article mentioned by Digsy): it only works for server platforms.
 
this is I believe down to the 32bit processor which can only handle 2 to the power 32 which is where the 2GB comes in
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top