473,406 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Maximum memory allocation

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.

Aug 29 '06 #1
3 3673
wa******@gmail.com wrote:
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
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 29 '06 #2

wa******@gmail.com wrote:
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

Aug 29 '06 #3
ge*********@gmail.com wrote:
wa******@gmail.com wrote:
>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.
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-lit...t.html#faq-5.9 for a
list of suggested groups.
Aug 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: chris | last post by:
Hi all, I need to know, what is the difference between dynamic memory allocation, and stack allocation ? 1. If I have a class named DestinationAddress, when should I use dynamic memory...
5
by: Evangelista Sami | last post by:
hello is there a maximum size that can be allocated by a malloc call? is this defined by the standard? thanks Sami Evangelista
19
by: Jerry | last post by:
I am wondering what is the maximum size of memory that malloc() could handle. Is there any limitation on that? Where am I supposed to get this kind of information? Thank you everybody.
22
by: Zen | last post by:
Hi, My production machine has 2G of memory, when aspnet_wp.exe goes up to about ~1.2G of memory usage, I start get out-of-memory exception. Other processes don't use as much memory and I added...
62
by: ivan.leben | last post by:
How can I really delete a preloaded image from memory/disk cache? Let's say I preload an image by creating an Image object and setting its src attribute to desired URL: var img = new Image();...
23
by: Gerrit | last post by:
Hi all, I'm getting an OutOfMemoryException when I initialize a byte array in C# like this: Byte test = new Byte; I'm using ASP.NET 2.0. In ASP.Net 1.1 it works fine. So what am I doing...
24
by: Ken | last post by:
In C programming, I want to know in what situations we should use static memory allocation instead of dynamic memory allocation. My understanding is that static memory allocation like using array...
1
by: Peterwkc | last post by:
Hello all expert, i have two program which make me desperate bu after i have noticed the forum, my future is become brightness back. By the way, my problem is like this i the first program was...
18
by: raylopez99 | last post by:
The maximum int for an array on my machine (a Pentium IV with 2 GB RAM) is < 330 Million...before you get an "out of memory" exception. I simply filled an array of this size with ints...I got as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.