Maximum memory allocation

W

wazurkar

hi,

I am new to c++. how we can see - how much maximum memory we can
allocate through C++ program on Windows XP OS. Though its system
dependant I guess it shouldn't be more than 4GB on 32 bit machine.
 
V

Victor Bazarov

I am new to c++. how we can see - how much maximum memory we can
allocate through C++ program on Windows XP OS. Though its system
dependant I guess it shouldn't be more than 4GB on 32 bit machine.

Please ask in a Windows XP OS programming newsgroup. C++ is but
a language, any platform-specific elements, like the amount of memory
available to a program on a particular OS, are discussed elsewhere.
The list of suggested newsgroups is in the FAQ, section 5.

V
 
G

george.priv

hi,

I am new to c++. how we can see - how much maximum memory we can
allocate through C++ program on Windows XP OS. Though its system
dependant I guess it shouldn't be more than 4GB on 32 bit machine.

If you keep allocating memory on VM system like XP, you may not even
get memory exception pass allocating over physical memory limits.
System will always try to satisfy the memory request at the expense of
performance. You may keep track of Page file but that will be platform
specific and is OT here. Better approach will be to take another
(critical) look at your algorithm.

George Privalov
 
R

red floyd

Yeah, it's OT, but I'm in a forgiving mood this afternoon :)

It depends on which version of XP/2003/2000 you have.

In general you get 2GB of virtual address space. If the system was
booted with the /3GB flag, you get 3GB. This is for the workstation
versions. Your mileage may vary for the Advanced/Enterprise/Datacenter
versions which support much more physical memory. I believe they still
restrict processes to 2 or 3GB of virtual memory per process, however.

As always, since this is OT, you should take this with a large grain of
salt, and ask in a platform specific newsgroup. See
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9 for a
list of suggested groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top